What is the purpose of torch.neg
, torch.square
, and torch.sqrt
?
Based on the doc, they are just regular operations. That is, the following lines are exactly the same.
[torch.neg(x), torch.square(x), torch.sqrt(x)]
[x.neg(), x.square(), x.sqrt()]
[-x, x**2, x**-0.5]
Which one should I use?