In fact, I never add contiguous after expand. I often use expand for something like broadcast in numpy, after the broadcast operation, the result should be collect and is contiguous.
import torch as t
a = t.Tensor(3,4)
b = t.Tensor(3)
c = b.unsqueeze(1).expand_as(a) + a
print(c.is_contiguous())

expand  is a memory-efficient operation because it won’t copy data in memory(repeat will do ), if you make it contiguous, it will copy data and occupy extra memory.
import torch as t
a = t.Tensor(1,3)
b = a.expand(100000000000,3)
print(id(a.storage())==id(b.storage()))
print(b.storage())
# !!!!dont't do below!!!!!
# Print(b) or b.contiguous()