-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spiking RNN bug #101
Comments
Thanks for you debug! spikingjelly/spikingjelly/clock_driven/rnn.py Line 333 in 6364d88
spikingjelly/spikingjelly/clock_driven/rnn.py Line 846 in 6364d88
Then its spikingjelly/spikingjelly/clock_driven/rnn.py Line 832 in 6364d88
So, in Line 471: spikingjelly/spikingjelly/clock_driven/rnn.py Line 471 in 6364d88
|
When spikingjelly/spikingjelly/clock_driven/rnn.py Line 701 in 6364d88
The s spikingjelly/spikingjelly/clock_driven/rnn.py Line 418 in 6364d88
Then the tuple is concatenated by spikingjelly/spikingjelly/clock_driven/rnn.py Line 484 in 6364d88
|
I understand what you mean. But this bug occurs in the GRU layer. Used 'pytorch==1.6.0' and 'spikingjelly==0.0.0.4', the following code reports an error: Another thing that puzzles me is that in any case, RNN always generates LSTM Cells: (line306 & 308) spikingjelly/spikingjelly/clock_driven/rnn.py Line 306 in 6364d88
Should the correct writing be self.base_cell() (line297) instead of SpikingLSTMCell ?
|
Yes, I will fix it. |
This problem is caused by spikingjelly/spikingjelly/clock_driven/rnn.py Line 306 in 6364d88
Now the code can run correctly. |
Thank you very much. It solved my problem perfectly. |
There is a bug in file 'spikingjelly/clock_driven/rnn.py' line 471 and 482.
The RNN cell in PyTorch will return the 'output' and hidden state 'h_n', see:
https://pytorch.org/docs/stable/generated/torch.nn.GRU.html?highlight=gru#torch.nn.GRU
I think line 471 & 482 should be modified as:
new_states_list[0], _ = self.cells[0](x[t], states_list[0])
new_states_list[i], _ = self.cells[i](y, states_list[i])
The text was updated successfully, but these errors were encountered: