[RLLIB] Convert torch state arrays to tensors during compute log likelihoods (#11708)

This commit is contained in:
mvindiola1
2020-11-04 03:33:56 -05:00
committed by GitHub
parent b7531fb4f5
commit 4518fe790f
+4
View File
@@ -306,6 +306,10 @@ class TorchPolicy(Policy):
if prev_reward_batch is not None:
input_dict[SampleBatch.PREV_REWARDS] = prev_reward_batch
seq_lens = torch.ones(len(obs_batch), dtype=torch.int32)
state_batches = [
convert_to_torch_tensor(s, self.device)
for s in (state_batches or [])
]
# Exploration hook before each forward pass.
self.exploration.before_compute_actions(explore=False)