nn.Contiguous is part of the legacy package and unless you’re coming from Lua Torch you probably should never touch that code.
x = torch.randn(5, 4)
print(x.stride(), x.is_contiguous())
print(x.t().strinde(), x.t().is_contiguous())
x.view(4, 5) # ok
x.t().view(4, 5) # fails