spikingjelly.clock_driven.ann2snn package

Subpackages

Submodules

spikingjelly.clock_driven.ann2snn.modules module

class spikingjelly.clock_driven.ann2snn.modules.VoltageHook(scale=1.0, momentum=0.1, mode='Max')[源代码]

基类:Module

参数
  • scale (float) – 缩放初始值

  • momentum (float) – 动量值

  • mode (str, float) – 模式。输入“Max”表示记录ANN激活最大值,“99.9%”表示记录ANN激活的99.9%分位点,输入0-1的float型浮点数表示记录激活最大值的对应倍数。

VoltageHook 用于在ANN推理中确定激活的范围。

参数
  • scale (float) – initial scaling value

  • momentum (float) – momentum value

  • mode (str, float) – The mode. Value “Max” means recording the maximum value of ANN activation, “99.9%” means recording the 99.9% precentile of ANN activation, and a float of 0-1 means recording the corresponding multiple of the maximum activation value.

VoltageHook is used to determine the range of activations in ANN inference.

forward(x)[源代码]
training: bool
class spikingjelly.clock_driven.ann2snn.modules.VoltageScaler(scale=1.0)[源代码]

基类:Module

参数

scale (float) – 缩放值

VoltageScaler 用于SNN推理中缩放电流。

参数

scale (float) – scaling value

VoltageScaler is used for scaling current in SNN inference.

forward(x)[源代码]
extra_repr()[源代码]
training: bool

Module contents