Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


torch (version 0.2.0)

torch_frac: Frac

Description

Frac

Usage

torch_frac(self)

Arguments

self

the input tensor.

frac(input, out=NULL) -> Tensor

Computes the fractional portion of each element in input.

outi=inputi|inputi|sgn(inputi)

Examples

Run this code
# NOT RUN {
if (torch_is_installed()) {

torch_frac(torch_tensor(c(1, 2.5, -3.2)))
}
# }

Run the code above in your browser using DataLab