qualia_plugin_snn.learningframework.SpikingJellyMultiStepTimeStepsInData module
Provide the SpikingJelly multi-step with timesteps in input data learningframework module.
- class qualia_plugin_snn.learningframework.SpikingJellyMultiStepTimeStepsInData.SpikingJellyMultiStepTimeStepsInData[source]
Bases:
SpikingJellyTimeStepsInData
SpikingJelly multi-step with timesteps in data LearningFramework implementation extending SpikingJelly single-step.
- class TrainerModule[source]
Bases:
TrainerModule
SpikingJelly multi-step with timesteps in data TrainerModule extending SpikingJelly single-step TrainerModule.
- forward(x: Tensor) Tensor [source]
Forward pass for a Spiking Neural Network model with timesteps in input data in multi-step mode.
First calls SpikingJelly’s reset on the model to reset neurons potentials. Call
qualia_plugin_snn.learningmodel.pytorch.SNN.SNN.forward()
for each timestep of the input data. Finally, average the output of the model over the timesteps.- Parameters:
x (Tensor) – Input data with timestep dimension in [N, T, C, S] or [N, T, C, H, W] order
- Returns:
Output predictions
- Raises:
ValueError – when the input data does not have the correct number of dimenions or the timestep dimension does not match
qualia_plugin_snn.learningmodel.pytorch.SNN.SNN.timesteps
- Return type: