Skip to content

Commit c6a0ae6

Browse files
committed
fixed bugs
modify update_priorities to avoid zip error
1 parent a74687a commit c6a0ae6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dqn.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ def sample(self, frame_idx, batch_size=20, beta_frames=3000):
8787
action_samples, reward_samples, next_state_samples, done_samples, indices, weights
8888

8989
def update_priorities(self, batch_indices, batch_priorities):
90-
for idx, prio in zip(batch_indices, batch_priorities):
91-
self.priorities[idx] = prio
90+
# for idx, prio in zip(batch_indices, batch_priorities):
91+
# self.priorities[idx] = prio
92+
for idx in batch_indices:
93+
self.priorities[idx] = batch_priorities
9294

9395
def __len__(self):
9496
return self.cnt

0 commit comments

Comments
 (0)