torchrl.trainers.algorithms.configs.objectives.A2CLossConfig#
- class torchrl.trainers.algorithms.configs.objectives.A2CLossConfig(_partial_: bool = False, actor_network: Any = None, critic_network: Any = None, entropy_bonus: bool = True, samples_mc_entropy: int = 1, entropy_coeff: float | None = None, critic_coeff: float = 1.0, loss_critic_type: str = 'smooth_l1', gamma: float | None = None, separate_losses: bool = False, advantage_key: Any = None, value_target_key: Any = None, 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_a2c_loss')[source]#
Hydra configuration for
A2CLoss.Every kwarg accepted by
A2CLoss.__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.