Tensor
[number] size(dim)
Returns the size of the specified dimension dim. Example:
dim
> x = torch.Tensor(4,5):zero() > print(x) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [torch.Tensor of dimension 4x5] > return x:size(2) -- gets the number of columns 5