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
Describe the bug
I'm trying to train recurrent neurons, but i'm not a
ble due to some errors in the code.
i'm posting down the code of the net itself. To reproduce current behavior
Steps to reproduce the behavior:
When I run this code (add code or minimum test case) ...
Traceback (most recent call last):
File "/root/lava-dl_experiment/src/experiment13.py", line 194, in <module>
main()
File "/root/lava-dl_experiment/src/experiment13.py", line 152, in main
output = assistant.train(input.to(device), label)
File "/opt/conda/lib/python3.10/site-packages/lava/lib/dl/slayer/utils/assistant.py", line 121, in train
output = self.net(input)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/lava-dl_experiment/src/experiment13.py", line 56, in forward
x = self.blocks[1](x)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/lava/lib/dl/slayer/block/base.py", line 1476, in forward
x = recurrent.custom_recurrent(z, self.neuron, self.recurrent_synapse)
File "/opt/conda/lib/python3.10/site-packages/lava/lib/dl/slayer/utils/recurrent.py", line 42, in custom_recurrent
return CustomRecurrent.apply(z, neuron, recurrent_mat)
File "/opt/conda/lib/python3.10/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "/opt/conda/lib/python3.10/site-packages/lava/lib/dl/slayer/utils/recurrent.py", line 64, in forward
feedback = torch.matmul(spike[..., 0], recurrent_mat_T)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm)
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem. Remove section otherwise.
Environment (please complete the following information):
Describe the bug
I'm trying to train recurrent neurons, but i'm not a
ble due to some errors in the code.
i'm posting down the code of the net itself.
To reproduce current behavior
Steps to reproduce the behavior:
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem. Remove section otherwise.
Environment (please complete the following information):
Additional context
Add any other context about the problem here. Remove section otherwise.
The text was updated successfully, but these errors were encountered: