
Last chance! 50% off unlimited learning
Sale ends in
Abs
torch_abs(self)
(Tensor) the input tensor.
Computes the element-wise absolute value of the given input
tensor.
if (torch_is_installed()) {
torch_abs(torch_tensor(c(-1, -2, 3)))
}
Run the code above in your browser using DataLab