qualia_plugin_snn.learningmodel.pytorch.layers.spikingjelly.GlobalSumPool1d module

Contain implementation of GlobalSumPool1d layer with support for SpikingJelly step_mode.

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

Bases: GlobalSumPool1d, StepModule

GlobalSumPool1d SpikingJelly’s step_mode support to Qualia’s GlobalSumPool1d 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 GlobalSumPool1d.

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]

GlobalSumPool1d step_mode to the __repr__ method.

Returns:

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

Return type:

str