norse.dataset.memory module¶
- class norse.dataset.memory.MemoryStoreRecallDataset(samples, seq_length=100, seq_periods=12, seq_repetitions=4, population_size=5, poisson_rate=100, dt=0.001, seed=None)[source]¶
Bases:
Generic
[torch.utils.data.dataset.T_co
]A memory dataset that generates random patterns of 4-bit data, and a 2-bit command pattern (store and recall).
Note that you can control the randomness by setting a manual seed in PyTorch.
Inspired by Bellec et al.: Biologically inspired alternatives to backpropagation through time for learning in recurrent neural nets.
- Parameters
samples (int) – Number of samples in the dataset.
seq_length (int) – Number of timesteps to simulate per command. Defaults to 100.
seq_periods (int) – Number of commands in one sample. Defaults to 12.
seq_repetitions (int) – Number of times one store/recall pair occurs in a single sample. Defaults to 4.
population_size (int) – Number of neurons encoding each command. Defaults to 5.
poisson_rate (int) – Poisson rate for each command in Hz. Defaults to 250.
dt (float) – Timestep for the dataset. Defaults to 0.001 (1000Hz).
seed (Optional[int]) – Optional seed for the random generator