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

torch.FloatTensor constructor received an invalid combination of arguments #5

Open
micklexqg opened this issue Dec 13, 2017 · 2 comments

Comments

@micklexqg
Copy link

I try to run test_one.py but failed at real_center = torch.FloatTensor(1, 3, opt.imageSize/2, opt.imageSize/2) with the error:
ypeError: torch.FloatTensor constructor received an invalid combination of arguments - got (int, int, float, float), but expected one of:

  • no arguments
  • (int ...)
    didn't match because some of the arguments have invalid types: (!int!, !int!, !float!, !float!)
  • (torch.FloatTensor viewed_tensor)
  • (torch.Size size)
  • (torch.FloatStorage data)
  • (Sequence data)
    is there any thing wrong?
@BoyuanJiang
Copy link
Owner

try:
real_center = torch.FloatTensor(1, 3, int(opt.imageSize/2), int(opt.imageSize/2))
instead

@micklexqg
Copy link
Author

@BoyuanJiang , yes, thank you , I have fixed it.

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