Expand description
Behavioral Cloning trainer (Burn backend).
Sibling to crate::train::a2c::trainer::A2cTrainer and
crate::train::ppo::trainer::PPOTrainerBurn. BcTrainer reuses the
same policy (MlpBurnPolicy), optimizer (BurnOptimizer) and the
Option<P> move-through-step ownership model (Burn’s
Optimizer::step consumes the module by value). It DIVERGES from every
RL trainer in loop shape:
- No environment interaction. Training is a supervised epoch loop over a
fixed
Demonstrationsdataset. - No advantages / returns / entropy. The objective is the plain
cross-entropy of the expert action (
compute_bc_loss); the policy’s value head is ignored. - Many gradient steps per call.
BcTrainer::train_epochperforms one step per minibatch (ceil(len / batch_size)steps per epoch), shuffling the example order from the trainer’s seeded RNG so two runs with the sameBcConfig::seedproduce identical minibatch order and stats.
Structs§
- BcEpoch
Stats - Per-epoch behavioral-cloning statistics.
- BcTrainer
- Burn-backend Behavioral Cloning trainer.