Learn R Programming

rTorch (version 0.0.3)

dim.torch.Tensor: Dimensions of a tensor

Description

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

Usage

# S3 method for torch.Tensor
dim(x)

Arguments

x

tensor

Value

a vector of integers with the dimensions of the tensor