Frac
torch_frac(self)
self | the input tensor. |
---|
Computes the fractional portion of each element in input
.
$$ \mbox{out}_{i} = \mbox{input}_{i} - \left\lfloor |\mbox{input}_{i}| \right\rfloor * \mbox{sgn}(\mbox{input}_{i}) $$
#> torch_tensor #> 0.0000 #> 0.5000 #> -0.2000 #> [ CPUFloatType{3} ]