-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
Description
Running this code:
x = torch.LongTensor(3, 4).random_(10)
torch.LongTensor(x.numpy()[::-1])returns the following error:
RuntimeError: $ Torch: invalid memory size -- maybe an overflow? at /home/guismay/pytorch-master/torch/lib/TH/THGeneral.c:257
So I have to run torch.LongTensor(x.numpy()[::-1].copy())instead.