Abs
torch_abs(self)
(Tensor) the input tensor.
Computes the element-wise absolute value of the given input
tensor.
# NOT RUN {
if (torch_is_installed()) {
torch_abs(torch_tensor(c(-1, -2, 3)))
}
# }
Run the code above in your browser using DataLab