The question concerns the torch.distributions implementation. This is the canonical example from the relase page 70,
probs = policy_network(state)
# NOTE: categorical is equivalent to what used to be called multinomial
m = torch.distributions.Categorical(probs)
action = m.sample()
next_state, reward = env.step(action)
loss = -m.log_prob(action) * reward
loss.backward()

Usually, the probabilities are obtained from policy_network as a result of a softmax operation.
However, if we subsequently take a logarithm of the softmax probabilities, are not we loosing the numerical precision?
And if so, why  the Categorical distribution is not implemented in the way that allows object construction with only logits provided?