When calculating firing rate for the spiking neurons, spike, rate = spike_rate(output[0]) was used. However, output is actually a torch.tensor, not a tuple, therefore this only takes spikes of the first time step into account, which I think is not correct. Adding an if-statement if isinstance(output, tuple) may solve this problem.
When calculating firing rate for the spiking neurons,
spike, rate = spike_rate(output[0])
was used. However,output
is actually atorch.tensor
, not a tuple, therefore this only takes spikes of the first time step into account, which I think is not correct. Adding an if-statementif isinstance(output, tuple)
may solve this problem.