neurobench.models
Torch Models
- class neurobench.models.torch_model.TorchModel(net)[source]
Bases:
NeuroBenchModel
The TorchModel class wraps an nn.Module.
SNNTorch Models
- class neurobench.models.snntorch_models.SNNTorchModel(net)[source]
Bases:
NeuroBenchModel
The SNNTorch class wraps the forward pass of the SNNTorch framework and ensures that spikes are in the correct format for downstream NeuroBench components.
- __call__(data)[source]
Executes the forward pass of SNNTorch models on data that follows the NeuroBench specification. Ensures spikes are compatible with downstream components.
- Parameters:
data – A PyTorch tensor of shape (batch, timesteps, …)
- Returns:
A PyTorch tensor of shape (batch, timesteps, …)
- Return type:
spikes