ray.rllib.core.learner.learner.Learner._get_tensor_variable#

abstract Learner._get_tensor_variable(value: Any, dtype: Any = None, trainable: bool = False) numpy.array | jnp.ndarray | tf.Tensor | torch.Tensor[source]#

Returns a framework-specific tensor variable with the initial given value.

This is a framework specific method that should be implemented by the framework specific sub-classes.

Parameters:

value – The initial value for the tensor variable variable.

Returns:

The framework specific tensor variable of the given initial value, dtype and trainable/requires_grad property.