Skip to main content

Module trainer

Module trainer 

Source
Expand description

Synchronous Advantage Actor-Critic (A2C) trainer (Burn backend).

Sibling to crate::train::ppo::trainer::PPOTrainerBurn. A2C reuses the same policy (MlpBurnPolicy), optimizer (BurnOptimizer) and GAE/advantage path, and shares PPO’s Option<P> move-through ownership model (Burn’s Optimizer::step consumes the module by value). It diverges from PPO in exactly two places:

  1. Loss — un-clipped policy-gradient loss + plain-MSE value loss (see crate::train::a2c::loss); no importance ratio, no value clipping.
  2. Loop — exactly one gradient step per rollout: no epoch loop, no minibatch shuffle, no KL early-stop. Consequently A2cTrainer::train_step drops the old_log_probs / old_values arguments PPO needs for its importance ratio and value clipping.

Structs§

A2cStats
Per-update A2C training statistics.
A2cTrainer
Burn-backend A2C trainer.