Skip to content
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

RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 'mat2' #201

Closed
vankhoa21991 opened this issue Feb 28, 2019 · 1 comment

Comments

@vankhoa21991
Copy link

vankhoa21991 commented Feb 28, 2019

Hello, I ran the minimal_reservoir.py and got this error:
Loading training images from serialized object file.

Loading training labels from serialized object file.

Train progress: (50 / 500)
Train progress: (100 / 500)
Train progress: (150 / 500)
Train progress: (200 / 500)
Train progress: (250 / 500)
Train progress: (300 / 500)
Train progress: (350 / 500)
Train progress: (400 / 500)
Train progress: (450 / 500)
Train progress: (500 / 500)

Traceback (most recent call last):
File "/home/kevin/IMRA_le/3_Program/SNN/bindsnet/examples/mnist/minimal_reservoir.py", line 52, in
output = model(s)
File "/home/kevin/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/kevin/IMRA_le/3_Program/SNN/bindsnet/examples/mnist/minimal_reservoir.py", line 19, in forward
return self.linear(x)
File "/home/kevin/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/kevin/py36/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 67, in forward
return F.linear(input, self.weight, self.bias)
File "/home/kevin/py36/lib/python3.6/site-packages/torch/nn/functional.py", line 1354, in linear
output = input.matmul(weight.t())
RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 'mat2'

@djsaunde
Copy link
Collaborator

Hi @vankhoa21991, I fixed the bug in PR #203. Let me know if you have more issues.

@djsaunde djsaunde closed this as completed Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants