Reinforcement Learning, Gaming, Deep Learning.
loc, scale = self.policy(obs) dist = Normal(loc, scale) log_prob = dist.log_prob(action).sum(dim=-1, keepdim=True) policy_loss = - log_prob * returns entropy = dist.entropy().sum(dim=-1, keepdim=True) self.log("episode/Policy Loss", policy_loss.mean()) self.log("episode/Entropy", entropy.mean())