xlnstorch.LNSTensor.size

Contents

xlnstorch.LNSTensor.size#

LNSTensor.size(dim=None)#

Returns the size of the LNSTensor along a specified dimension or all dimensions.

Parameters:
  • dim (int, optional) – If specified, returns the size of the given dimension; otherwise,

  • dimensions. (returns the size of all)

Returns:

The size of the LNSTensor. The returned value is a torch.Size if dim is None, otherwise it returns an integer representing the size of the specified dimension.

Return type:

torch.Size or int