-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Description
PyTorch version: 0.3.0
Python version: 3.6
This may well be desired behaviour, but it is a departure from 0.2.0. To reproduce:
In [5]: import numpy as np
In [6]: import torch
In [7]: torch.from_numpy(np.arange(10)).repeat(3)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-7-18d470bf42ef> in <module>()
----> 1 torch.from_numpy(np.arange(10)).repeat(3)
/path/torch/tensor.py in repeat(self, *sizes)
273
274 size = torch.Size([a * b for a, b in zip(xsize, repeats)])
--> 275 xtensor.resize_(torch.Size(xsize))
276 result.resize_(size)
277 urtensor = result.new(result)
RuntimeError: calling resize_ on a tensor that has non-resizable storage. Clone it first or create a new tensor instead.
Metadata
Metadata
Assignees
Labels
No labels