At present, we generate input spikes prior to simulation. This results in tensors of shape [time, *input_shape]. When time and / or input_shape is large, this uses a lot of memory.
What we could do is generate spikes from encodings as-needed during simulation. The most obvious way to implement this, to me, is to create Nodes objects which maintain the variables needed to generate spikes according to their encoding function. For example, PoissonNodes would maintain rate parameters and generate spikes per timestep according to that rate. This would reduce memory usage down from [time, *input_shape] to just [*input_shape], which would be a big win especially for long simulations.
At present, we generate input spikes prior to simulation. This results in tensors of shape
[time, *input_shape]. Whentimeand / orinput_shapeis large, this uses a lot of memory.What we could do is generate spikes from encodings as-needed during simulation. The most obvious way to implement this, to me, is to create
Nodesobjects which maintain the variables needed to generate spikes according to their encoding function. For example,PoissonNodeswould maintain rate parameters and generate spikes per timestep according to that rate. This would reduce memory usage down from[time, *input_shape]to just[*input_shape], which would be a big win especially for long simulations.