mirror of
https://github.com/wassname/ray.git
synced 2026-07-07 09:04:14 +08:00
[RLLIB] Convert torch state arrays to tensors during compute log likelihoods (#11708)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user