qualia_plugin_snn.learningmodel.pytorch.layers.spikingjelly.QuantizedGlobalSumPool2d module

Contain implementation of QuantizedGlobalSumPool2d layer with support for SpikingJelly step_mode.

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

Bases: QuantizedGlobalSumPool2d, StepModule

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

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

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

Construct QuantizedGlobalSumPool2d.

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

  • quant_params (QuantizationConfigDict)

Return type:

None

extra_repr() str[source]

GlobalSumPool2d step_mode to the __repr__ method.

Returns:

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

Return type:

str