Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
muupan committed May 26, 2021
1 parent 711bff6 commit 5e99719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/agents_tests/test_acer.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def base_loss_func(distrib):
# Any loss that tends to increase KL divergence should be ok.
# Here I choose to minimize the log probability of some fixed action.
# The loss is clipped to avoid NaN.
return torch.max(distrib.log_prob(some_action), torch.as_tensor(-20.))
return torch.max(distrib.log_prob(some_action), torch.as_tensor(-20.0))

def compute_kl_after_update(loss_func, n=100):
policy = copy.deepcopy(base_policy)
Expand Down

0 comments on commit 5e99719

Please sign in to comment.