Skip to content

invalid memory size #230

@glample

Description

@glample

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions