Learn R Programming

rTorch (version 0.4.2)

log2.torch.Tensor: Logarithm of a tensor in base 2

Description

Logarithm of a tensor in base 2

Usage

# S3 method for torch.Tensor
log2(x)

Arguments

x

a tensor

Examples

Run this code
# NOT RUN {
x <- torch$tensor(c(512, 1024, 2048, 4096))   # tensor([ 9., 10., 11., 12.])
# }

Run the code above in your browser using DataLab