From 5303c3abe322cbd90f75bcf03ee1f9c3dad23aae Mon Sep 17 00:00:00 2001 From: Raphael Avalos Date: Thu, 23 Jul 2020 19:43:20 +0200 Subject: [PATCH] Fix TorchDeterministic (#9241) --- rllib/models/torch/torch_action_dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rllib/models/torch/torch_action_dist.py b/rllib/models/torch/torch_action_dist.py index 78c1c4348..9605f6e3c 100644 --- a/rllib/models/torch/torch_action_dist.py +++ b/rllib/models/torch/torch_action_dist.py @@ -308,7 +308,7 @@ class TorchDeterministic(TorchDistributionWrapper): @override(TorchDistributionWrapper) def sampled_action_logp(self): - return 0.0 + return torch.zeros((self.inputs.size()[0], ), dtype=torch.float32) @override(TorchDistributionWrapper) def sample(self):