View source: R/gen-namespace.R
torch_frac | R Documentation |
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})
if (torch_is_installed()) {
torch_frac(torch_tensor(c(1, 2.5, -3.2)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.