Whats the purpose of torch.positive?
From the documentation:

torch.positive(input) → Tensor
Returns input. Throws a runtime error if input is a bool tensor.

It just returns the input and throws error if its a bool tensor, but that's not an efficient nor readable way of checking if a tensor is bool.

It seems like pytorch added pytorch.positive in parity with numpy which has a function of the same name.
So back to your question, positive is a unary operator which basically multiplies everything by +1. This is not a particularly useful operation, but is symmetric to negative which multiplies everything by -1.
&gt;&gt;&gt; import numpy as np
&gt;&gt;&gt; a = np.arange(10)
&gt;&gt;&gt; a
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
&gt;&gt;&gt; np.positive(a)
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
&gt;&gt;&gt; np.negative(a)
array([ 0, -1, -2, -3, -4, -5, -6, -7, -8, -9])

So why make a positive function that effectively returns (a copy of) the array you passed? It can be used to write general code where e.g. numpy.positive and numpy.negative can be used dynamically based on some condition.
