Skip to content

Commit

Permalink
add PER support
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxiyang1993 committed Mar 20, 2020
1 parent ebc9434 commit fe486e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def update_weights(self, batch):
for i in range(1, len(predictions)):
value, reward, policy_logits = predictions[i]
pred_value_scalar = self.support_to_scalar(value, self.config.support_size)
priorities[:, i] = numpy.abs(pred_value_scalar.detach().numpy().squeeze() - target_value_scalar[:, 0]) ** .5
priorities[:, i] = numpy.abs(pred_value_scalar.detach().numpy().squeeze() - target_value_scalar[:, i]) ** .5
(
current_value_loss,
current_reward_loss,
Expand Down

0 comments on commit fe486e3

Please sign in to comment.