ray.rllib.models.modelv2.ModelV2.variables#

ModelV2.variables(as_dict: bool = False) List[numpy.array | jnp.ndarray | tf.Tensor | torch.Tensor] | Dict[str, numpy.array | jnp.ndarray | tf.Tensor | torch.Tensor][source]#

Returns the list (or a dict) of variables for this model.

Parameters:

as_dict – Whether variables should be returned as dict-values (using descriptive str keys).

Returns:

The list (or dict if as_dict is True) of all variables of this ModelV2.