ray.rllib.models.torch.torch_modelv2.TorchModelV2.__init__
ray.rllib.models.torch.torch_modelv2.TorchModelV2.__init__#
- TorchModelV2.__init__(obs_space: <MagicMock name='mock.spaces.Space' id='140494124151808'>, action_space: <MagicMock name='mock.spaces.Space' id='140494124151808'>, num_outputs: int, model_config: dict, name: str)[source]#
Initialize a TorchModelV2.
Here is an example implementation for a subclass
MyModelClass(TorchModelV2, nn.Module):def __init__(self, *args, **kwargs): TorchModelV2.__init__(self, *args, **kwargs) nn.Module.__init__(self) self._hidden_layers = nn.Sequential(...) self._logits = ... self._value_branch = ...