Unverified Commit 55f3f240 authored by Jaeyoun Kim's avatar Jaeyoun Kim Committed by GitHub
Browse files

Update replay_buffer.py

Fixed bug
parent 5f1c1b09
...@@ -133,7 +133,7 @@ class PrioritizedReplayBuffer(ReplayBuffer): ...@@ -133,7 +133,7 @@ class PrioritizedReplayBuffer(ReplayBuffer):
self.remove_idx = idxs[-1] + 1 - self.init_length self.remove_idx = idxs[-1] + 1 - self.init_length
elif self.eviction_strategy == 'rank': elif self.eviction_strategy == 'rank':
# remove lowest-priority indices # remove lowest-priority indices
idxs = np.argpartition(self.priorities, n)[:n] idxs = np.argpartition(self.priorities, n-1)[:n]
return idxs return idxs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment