torchrl.trainers.algorithms.configs.objectives.ReinforceLossConfig#
- class torchrl.trainers.algorithms.configs.objectives.ReinforceLossConfig(_partial_: bool = False, actor_network: Any = None, critic_network: Any = None, delay_value: bool = False, loss_critic_type: str = 'smooth_l1', gamma: float | None = None, advantage_key: Any = None, value_target_key: Any = None, separate_losses: bool = False, functional: bool = True, actor: Any = None, critic: Any = None, reduction: str | None = None, clip_value: float | None = None, _target_: str = 'torchrl.trainers.algorithms.configs.objectives._make_reinforce_loss')[source]#
Hydra configuration for
ReinforceLoss.Every kwarg accepted by
ReinforceLoss.__init__is exposed as a field here.gamma,advantage_keyandvalue_target_keyare handled by the factory (viamake_value_estimatorandset_keys) rather than being forwarded to the constructor, which rejects them.