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.],
        [1., 1.]])
print(a.storage_offset())
> 2

Note that I used other indices for slicing to demonstrate the storage_offset.
If you want to create a copy, use a = b[0:2].clone()