Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RLlib] Issue #9437 (PyTorch converts to CPU tensor, even if on GPU). #9497

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes.
  • Loading branch information
sven1977 committed Jul 15, 2020
commit 04c94b84050e6fcf3b414858f4dbf813e8042c29
2 changes: 1 addition & 1 deletion rllib/agents/dqn/dqn_tf_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def postprocess_nstep_and_prio(policy, batch, other_agent=None, episode=None):
batch[SampleBatch.REWARDS], batch[SampleBatch.NEXT_OBS],
batch[SampleBatch.DONES], batch[PRIO_WEIGHTS])
new_priorities = (
np.abs(td_errors) + policy.config["prioritized_replay_eps"])
np.abs(td_errors.cpu()) + policy.config["prioritized_replay_eps"])
batch.data[PRIO_WEIGHTS] = new_priorities

return batch
Expand Down