Skip to content

Commit a912c72

Browse files
committed
removed unnecessary state gather
1 parent bc8e8a8 commit a912c72

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

agents/actor_critic_agents/SAC_Discrete.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def calculate_critic_losses(self, state_batch, action_batch, reward_batch, next_
7171
min_qf_next_target = action_probabilities * (torch.min(qf1_next_target, qf2_next_target) - self.alpha * log_action_probabilities)
7272
min_qf_next_target = min_qf_next_target.mean(dim=1).unsqueeze(-1)
7373
next_q_value = reward_batch + (1.0 - mask_batch) * self.hyperparameters["discount_rate"] * (min_qf_next_target)
74-
self.critic_target(next_state_batch).gather(1, next_state_action.unsqueeze(-1).long())
7574

7675
qf1 = self.critic_local(state_batch).gather(1, action_batch.long())
7776
qf2 = self.critic_local_2(state_batch).gather(1, action_batch.long())

0 commit comments

Comments
 (0)