
Last chance! 50% off unlimited learning
Sale ends in
Signbit
torch_signbit(self)
(Tensor) the input tensor.
Tests if each element of input
has its sign bit set (is less than zero) or not.
# NOT RUN {
if (torch_is_installed()) {
a <- torch_tensor(c(0.7, -1.2, 0., 2.3))
torch_signbit(a)
}
# }
Run the code above in your browser using DataLab