length.torch.Tensor {rTorch} | R Documentation |
Length of a tensor.
Description
This function is equivalent to torch$numel()
Usage
## S3 method for class 'torch.Tensor'
length(x)
Arguments
x |
tensor |
Value
the number of elements of a tensor as an integer
Examples
## Not run:
uo = torch$ones(3L, 5L) # tensor with 15 elements
length(uo)
## End(Not run)
[Package rTorch version 0.4.2 Index]