Skip to main content

Module module_eval_fn

Module module_eval_fn 

Source
Expand description

ModuleEvalFn — fitness adapter that scores a population of flat parameter rows by reconstructing one Burn module per row.

This is the only place flatten/unflatten happens in the weight-only pipeline. The WeightOnly strategy keeps the genome as a flat Tensor<B, 2> end-to-end and never reshapes; reshaping is confined to this evaluation boundary so the inner strategy’s selection/crossover/mutation operate on plain tensors.

Evaluation is loop-over-N: Burn 0.21 has no vmap/batched-forward primitive, so each population row is unflattened into a module and scored individually. A batched forward path is a future addition.

Structs§

ModuleEvalFn
Bridges a flat population tensor to per-member module scoring.