hxtorch.spiking.transforms.decode.SumOverTime
-
class
hxtorch.spiking.transforms.decode.
SumOverTime
(*args, **kwargs) Bases:
torch.nn.modules.module.Module
Simple sum-over-time decoding
-
__init__
(*args, **kwargs) → None Initializes internal Module state, shared by both nn.Module and ScriptModule.
Methods
forward
(input)Translate an input tensor of shape (batch_size, time_length, population_size) into a tensor of shape (batch_size, population_size), where the time dimension is discarded by computing the sum along the time.
Attributes
-
forward
(input: torch.Tensor) → torch.Tensor Translate an input tensor of shape (batch_size, time_length, population_size) into a tensor of shape (batch_size, population_size), where the time dimension is discarded by computing the sum along the time. Hence this module performs a ‘sum-over-time’ operation.
- Parameters
input – The input tensor to transform. expected shape: (batch_size, time_length, population_size)
- Returns
Returns the tensor holding the sum-over-time values.
-
training
: bool
-