ray.rllib.policy.eager_tf_policy_v2.EagerTFPolicyV2.action_sampler_fn#

EagerTFPolicyV2.action_sampler_fn(model: ray.rllib.models.modelv2.ModelV2, *, obs_batch: Union[numpy.array, tf.Tensor, torch.Tensor], state_batches: Union[numpy.array, tf.Tensor, torch.Tensor], **kwargs) Tuple[Union[numpy.array, tf.Tensor, torch.Tensor], Union[numpy.array, tf.Tensor, torch.Tensor], Union[numpy.array, tf.Tensor, torch.Tensor], List[Union[numpy.array, tf.Tensor, torch.Tensor]]][source]#

Custom function for sampling new actions given policy.

Parameters
  • model – Underlying model.

  • obs_batch – Observation tensor batch.

  • state_batches – Action sampling state batch.

Returns

Sampled action Log-likelihood Action distribution inputs Updated state