fangwei123456 / spikingjelly

SpikingJelly is an open-source deep learning framework for Spiking Neural Network (SNN) based on PyTorch.
https://spikingjelly.readthedocs.io
Other
1.29k stars 236 forks source link

visualizing.plot_2d_bar_in_3d问题 #434

Closed Taotaonoangry closed 11 months ago

Taotaonoangry commented 11 months ago

您好!在使用visualizing.plot_2d_bar_in_3d时,参考监视器中的教程 def cal_firing_rate(s_seq: torch.Tensor):

s_seq.shape = [T, N, *]

return s_seq.flatten(1).mean(1)

得到发放率,但它的shape为[A/N,T]。其中A是测试集的样本数量,N是batchsize,T是步长。将其转化为[T,A/N]后 使用plot_2d_bar_in_3d进行绘制,得到的是每个批次的在[0,T]时刻发放率的热力图。请问如何使用monitor得到每个神经元而不是批次在[0,T]时刻发放率的热力图呢? image

Taotaonoangry commented 11 months ago

问题解决了,之前忘记clear_recorded_data()了