You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users who want to use SpikingJelly should first be familiar with the usage of PyTorch.
If you do not know much about PyTorch, we recommend that the user can learn the basic tutorials of PyTorch.
Do not ask for help with the basic conception of PyTorch/Machine Learning but not related to SpikingJelly. For these questions, please refer to Google or PyTorch Forums.
For faster response
You can @ the corresponding developers for your issue. Here is the division:
import torch
import torch.nn as nn
from spikingjelly.activation_based import rnn, neuron, layer, surrogate
T = 6
h_dim = 32
batch = 5
x = torch.randn([T, batch, h_dim])
lstm = rnn.SpikingLSTM(32, 32, 1)
states = None
for t in range(8):
out, states = lstm(x, states)
以下是报错信息
Traceback (most recent call last):
File "E:\SNN\SNN_LSTM\SNN_LSTM\encoder.py", line 80, in
out, states = lstm(x, states)
File "E:\anaconda3\envs\social\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "E:\anaconda3\envs\social\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "E:\anaconda3\envs\social\lib\site-packages\spikingjelly\activation_based\rnn.py", line 473, in forward
new_states_list[:, 0] = torch.stack(self.cells[0](x[t], states_list[:, 0]))
File "E:\anaconda3\envs\social\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "E:\anaconda3\envs\social\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "E:\anaconda3\envs\social\lib\site-packages\spikingjelly\activation_based\rnn.py", line 685, in forward
i, f, g, o = torch.split(self.surrogate_function1(self.linear_ih(x) + self.linear_hh(h)),
ValueError: not enough values to unpack (expected 4, got 1)
The text was updated successfully, but these errors were encountered:
Read before creating a new issue
For faster response
You can @ the corresponding developers for your issue. Here is the division:
Yanqi-Chen
Yanqi-Chen
Lyu6PosHao
lucifer2859
AllenYolk
Lyu6PosHao
DingJianhao
Yanqi-Chen
fangwei123456
We are glad to add new developers who are volunteering to help solve issues to the above table.
Issue type
SpikingJelly version
0.0.0.0.14
Description
在处理序列信息时需要将前一时刻snnLSTM的隐状态值作为下一时刻的snnLSTM的隐状态初始值,但是这样做之后会报错。
代码如下。
Minimal code to reproduce the error/bug
以下是报错信息
The text was updated successfully, but these errors were encountered: