log.torch.Tensor {rTorch} | R Documentation |
Logarithm of a tensor given the tensor and the base
Description
Logarithm of a tensor given the tensor and the base
Usage
## S3 method for class 'torch.Tensor'
log(x, base = exp(1L))
Arguments
x |
a tensor |
base |
the base of the logarithm |
Examples
## Not run:
x <- torch$tensor(c(512, 1024, 2048, 4096)) # tensor([ 9., 10., 11., 12.])
base <- 2
log(x, base)
x <- torch$tensor(c(1, 10, 100, 1000)) # tensor([0., 1., 2., 3.])
log(x, 10)
## End(Not run)
[Package rTorch version 0.4.2 Index]