Expand description
PPO trainer (Burn backend).
After phase 5 of the Burn migration (#82), Burn is the only tensor
backend in the workspace. The historical train::ppo_burn parallel
sibling has been collapsed back into train::ppo. The trainer struct
retains its PPOTrainerBurn<B, P, O> name because Burn’s
optimizer-consumes-module ownership model is structurally different
from a hypothetical in-place trainer.
§Contents
config—PPOConfighyperparameters / builder API.stats—TrainingStats/AggregatedStatsper-update metrics.loss— backend-generic PPO loss math (policy/value/entropy) and thegenerate_minibatch_indiceshelper.trainer—PPOTrainerBurn<B, P, O>that owns the policy module (Burn’s optimizer-consumes-module ownership model) and exposes atrain_stepthat runs the surrogate-loss / gradient-step / KL early stop logic.
Re-exports§
pub use config::PPOConfig;pub use loss::compute_entropy_loss;pub use loss::compute_policy_loss;pub use loss::compute_value_loss;pub use loss::generate_minibatch_indices;pub use loss::scalar_f64;pub use stats::AggregatedStats;pub use stats::TrainingStats;pub use trainer::PPOTrainerBurn;