Hello,
note that the name sigmoid might mean different things to different groups of people.
Here, most commonly, sigmoid is sigmoid(x)= 1/(1+torch.exp(-x)) 78, mapping the real line to (0,1), so the inverse logit(y) = torch.log(p/(1-p)) 525 is defined on (0,1) only.
If you have renormalized sigmoid to -1+2/(1+torch.exp(-x)) to map to (-1, 1) you could use above logit with logit(1+0.5*y).
If you want the inverse of tanh, which is perhaps the most common mapping of the real line to (-1,1), you could code the inverse up yourself using torch.log, by using artanh(y) = 0.5*(torch.log(1+y)/(1-y)) 119.
Best regards
Thomas