Skip to content

Commit

Permalink
removed unnecessary state gather
Browse files Browse the repository at this point in the history
  • Loading branch information
p-christ committed Sep 15, 2019
1 parent bc8e8a8 commit a912c72
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion agents/actor_critic_agents/SAC_Discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def calculate_critic_losses(self, state_batch, action_batch, reward_batch, next_
min_qf_next_target = action_probabilities * (torch.min(qf1_next_target, qf2_next_target) - self.alpha * log_action_probabilities)
min_qf_next_target = min_qf_next_target.mean(dim=1).unsqueeze(-1)
next_q_value = reward_batch + (1.0 - mask_batch) * self.hyperparameters["discount_rate"] * (min_qf_next_target)
self.critic_target(next_state_batch).gather(1, next_state_action.unsqueeze(-1).long())

qf1 = self.critic_local(state_batch).gather(1, action_batch.long())
qf2 = self.critic_local_2(state_batch).gather(1, action_batch.long())
Expand Down

0 comments on commit a912c72

Please sign in to comment.