I am confused.
Python 3.6.5 and PyTorch 0.4.0
>>> a = torch.Tensor([[1,3],[5,7]])
>>> a
tensor([[ 1., 3.],
[ 5., 7.]])
>>> b = torch.Tensor(a)
>>> a_storage = a.storage()
>>> b_storage = b.storage()
>>> id(a.storage()) == id(b.storage())
True
>>> id(a_storage) == id(b_storage)
False
>>>
>>> a[0,0] = 0
>>> a
tensor([[ 0., 3.],
[ 5., 7.]])
>>> b
tensor([[ 0., 3.],
[ 5., 7.]])
and
>>> a = torch.tensor([[1,3],[5,7]])
>>> a
tensor([[ 1., 3.],
[ 5., 7.]])
>>> b = torch.tensor(a)
>>> a_storage = a.storage()
>>> b_storage = b.storage()
>>> id(a.storage()) == id(b.storage())
True
>>> id(a_storage) == id(b_storage)
False
>>>
>>> a[0,0] = 0
>>> a
tensor([[ 0., 3.],
[ 5., 7.]])
>>> b
tensor([[ 1., 3.],
[ 5., 7.]])
???