dim.torch.Tensor {rTorch}R Documentation

Dimensions of a tensor

Description

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

Usage

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

Arguments

x

tensor

Value

a vector of integers with the dimensions of the tensor

Examples

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

## End(Not run)


[Package rTorch version 0.4.2 Index]