Pytorch get elementwise signs of tensor

Hello,
I need an operation equivalent to tensorflow.math.sign(), i.e. elementwise application of sign to a tensor. What can I use?

Hi,

Have you tried torch.sign()?

1 Like

thanks, I hadn’t seen that one