fix(rllib): allow explore=False with tuple action distributions (#10443)

This commit is contained in:
Thomas Lecat 2020-09-11 00:03:02 +02:00 committed by GitHub
parent 7aa55ca82c
commit 504da45e69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,5 +72,5 @@ class StochasticSampling(Exploration):
logp = action_dist.sampled_action_logp()
else:
action = action_dist.deterministic_sample()
logp = torch.zeros((action.size()[0], ), dtype=torch.float32)
logp = torch.zeros_like(action_dist.sampled_action_logp())
return action, logp