qualia_plugin_snn.learningmodel.pytorch.layers.spikingjelly.GlobalSumPool2d module

Contain implementation of GlobalSumPool2d layer with support for SpikingJelly step_mode.

class qualia_plugin_snn.learningmodel.pytorch.layers.spikingjelly.GlobalSumPool2d.GlobalSumPool2d[source]

Bases: GlobalSumPool2d, StepModule

GlobalSumPool2d SpikingJelly’s step_mode support to Qualia’s GlobalSumPool2d layer.

There is no need to override :meth:foward since it works the same for single-step or multi-step mode.

__init__(step_mode: str = 's') None[source]

Construct GlobalSumPool2d.

Parameters:

step_mode (str) – SpikingJelly’s step_mode, either 's' or 'm', see spikingjelly.activation_based.layer.Linear

Return type:

None

extra_repr() str[source]

GlobalSumPool2d step_mode to the __repr__ method.

Returns:

String representation of qualia_core.learningmodel.pytorch.layers.GlobalSumPool2d with step_mode.

Return type:

str