Hi, Dear forum:
I want to get the signbit of a tensor. Pytorch provide a sign() function, however, it return 0 for zero. Is any way to return 1 if 0 and pos, otherwise -1?  I only want [1, -1] rather [1, 0, -1].