Created
October 2, 2017 08:40
-
-
Save Shmuma/97c7482cab4b0105c96de3ccd383c87f to your computer and use it in GitHub Desktop.
PyTorch byte Variable overflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import torch | |
>>> from torch.autograd import Variable | |
>>> t = torch.ByteTensor([240, 240]) | |
>>> t.sum() | |
480 | |
>>> v = Variable(t) | |
>>> v | |
Variable containing: | |
240 | |
240 | |
[torch.ByteTensor of size 2] | |
>>> v.sum() | |
Variable containing: | |
224 | |
[torch.ByteTensor of size 1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment