dim.torch.Tensor: Dimensions of a tensor

Description Usage Arguments Value Examples

Description

Get the dimensions of a tensor displaying it as a vector.

Usage

1
2
## S3 method for class 'torch.Tensor'
dim(x)

Arguments

x

tensor

Value

a vector of integers with the dimensions of the tensor

Examples

1
2
3
4
5
## Not run: 
uo = torch$ones(3L, 5L)  # it is a 3x5 tensor
dim(uo)

## End(Not run)

rTorch documentation built on Jan. 13, 2021, 4:32 p.m.