Learn R Programming

rTorch (version 0.0.3)

length.torch.Tensor: Length of a tensor.

Description

This function is equivalent to torch$numel()

Usage

# S3 method for torch.Tensor
length(x)

Arguments

x

tensor

Value

the number of elements of a tensor as an integer