Reinforcement Learning, Actor Critic, Deep Learning, Pytorch, Machine Learning.
has the right rsample() and add a correct log prob calculation method. With the ability to calculate a reparametrized action and its log prob, SAC works beautifully for discrete actions with minimal extra code, as seen below. Third, the training loop. Given the loss functions defined above, this is