Reading through the TensorFlow guide for Actor-Critic learning, I saw that the actor loss is multiplied by -1 when calculating:
The guide says this is to maximize the probabilities of actions with high rewards by minimizing its loss. My understanding may be flawed, but by taking multiplying the loss by -1, wouldn't the end gradients also be multiplied by -1 (and hence flipped), instead increasing the loss function?
Additionally, in Reinforcement Learning: An Introduction (Sutton and Barto), you see this instead, without the negative sign:
Specifically, this update here for the actor, where the gradient is not multiplied by -1:
Is there anything different between these two updates? I feel like there's an important concept or piece of calculus I might be missing here. Thanks!