Solved by ptrblck in post #2 
              
              
                a and b will share the same memory, but some attributes in a such as the size and possibly storage_offset will be changed. Here is a small example 
b = torch.zeros(3, 2)
a = b[1:3]
print(b)
> tensor([[0., 0.],
        [0., 0.],
        [0., 0.]])
a[:] = 1.
print(b)
> tensor([[0., 0.],
        [1., 1…