I am trying to implement $PPO$ for continuous action spaces so need probability of taking actions from a neural network with a tanh activation in the output layer since the action space ranges from $[-2, 2]$. I multiply the tanh output in the $[-1,1]$ range by $2$ to get this action.
I saw this: tanh converted to probability
but there is conflicting answers in the answer and comments:
0.5(a(x)+1) converts tanh to a probability.
says it is $0.5(a(2x) + 1)$...which I don't really understand if $a(x)$ is the $\tanh$ output then am I supposed to feed $2x$ to the network rather than $1x$ just for the purposes of this conversion from $\tanh$ to probability?
I do not have enough rep to comment so I posted a new question here.