- class sinabs.layers.SumPool2d(kernel_size, stride=None, ceil_mode=False)[source]#
Non-spiking sumpooling layer to be used in analogue Torch models. It is identical to torch.nn.LPPool2d with p=1.
kernel_size – the size of the window
stride – the stride of the window. Default value is kernel_size
ceil_mode – when True, will use ceil instead of floor to compute the output shape
- forward(input: torch.Tensor) torch.Tensor #
Defines the computation performed at every call.
Should be overridden by all subclasses.
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.