Expand description
Model builder.
MlpBuilder is the recommended way to define a model.
It makes model structure explicit (layer sizes + activations) and chooses a reasonable default weight initializer for each activation:
tanh/sigmoid/identity: Xavier/Glorotrelu/leaky relu: He/Kaiming
The resulting Mlp still supports the low-level, allocation-free hot path:
reuse Scratch / Gradients for per-sample forward/backward.
Structsยง
- MlpBuilder
- Builder for an
Mlp.