powered by
This function is equivalent to torch$numel()
# S3 method for torch.Tensor length(x)
tensor
the number of elements of a tensor as an integer
# NOT RUN { uo = torch$ones(3L, 5L) # tensor with 15 elements length(uo) # } # NOT RUN { # }
Run the code above in your browser using DataLab