ray.rllib.models.modelv2.ModelV2.__init__#
- ModelV2.__init__(obs_space: gymnasium.spaces.Space, action_space: gymnasium.spaces.Space, num_outputs: int, model_config: dict, name: str, framework: str)[source]#
Initializes a ModelV2 instance.
This method should create any variables used by the model.
- Parameters:
obs_space – Observation space of the target gym env. This may have an
original_space
attribute that specifies how to unflatten the tensor into a ragged tensor.action_space – Action space of the target gym env.
num_outputs – Number of output units of the model.
model_config – Config for the model, documented in ModelCatalog.
name – Name (scope) for the model.
framework – Either “tf” or “torch”.