Returns true
iff the elements of the Tensor
are contiguous in memory.
-- normal tensors are contiguous in memory > x = torch.Tensor(4,5):zero() > = x:isContiguous() true -- y now "views" the 3rd row of x -- the storage of y is the same than x -- so the memory cannot be contiguous > y = x:select(1, 3) > = y:isContiguous() false -- indeed, to jump to one element to -- the next one, the stride is 4 > = y:stride() 4 [torch.LongStorage of size 1]