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

invalid variables #20

Closed
vkadykova opened this issue May 19, 2018 · 6 comments
Closed

invalid variables #20

vkadykova opened this issue May 19, 2018 · 6 comments

Comments

@vkadykova
Copy link

When I run cifar.py I have the error:
new() received an invalid combination of arguments - got (Tensor, int, int, int), but expected one of:

  • (torch.device device)
  • (tuple of ints size, torch.device device)
  • (torch.Storage storage)
  • (Tensor other)
  • (object data, torch.device device)
    What is the problem?
    Thanks for the answer!
@bupt-zsp
Copy link

I meet the same problem, did you solve it now?

@vkadykova
Copy link
Author

Still no. Write, please, if you solve it:)

@bupt-zsp
Copy link

It's a version problem, I can run it in pytorch 0.2.0.

@szagoruyko
Copy link
Owner

thats due to torch.IntTensor becoming a variable, so creating a new tensor with shape from torch.IntTensor is not possible without explicit cast to int now. going to update the code for PyTorch 0.4 now

@szagoruyko
Copy link
Owner

fixed by #21

@vkadykova
Copy link
Author

Thanks a lot!

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

3 participants