spikingjelly.clock_driven.monitor package¶
Module contents¶
- class spikingjelly.clock_driven.monitor.Monitor(net: torch.nn.modules.module.Module, device: Optional[str] = None, backend: str = 'numpy')[源代码]¶
基类:
object
- 参数
- 参数
net (nn.Module) – Network to be monitored
device (str, optional) – Device carrying and processing monitored data. Only take effect when backend is set to
'torch'
. Can be'cpu', 'cuda', 'cuda:0'
, et al., defaults toNone
backend (str, optional) – Backend processing monitored data, can be
'torch', 'numpy'
, defaults to'numpy'
- get_avg_firing_rate(all: bool = True, module_name: Optional[str] = None) → torch.Tensor[源代码]¶
-
- 参数
- 返回
所关心层的平均发放率
- 返回类型
- 参数
- 返回
Averaged firing rate on concerned layers
- 返回类型
- get_nonfire_ratio(all: bool = True, module_name: Optional[str] = None) → torch.Tensor[源代码]¶
-
- 参数
- 返回
所关心层的静默神经元比例
- 返回类型
- 参数
- 返回
Ratio of silent neurons on concerned layers
- 返回类型