Losses#
Sparsity objectives minimized during training.
Loss functions for sparse basis training.
Mirror of upstream src/loss.jl. Single-image path only; batched loss dispatch is deferred to a later phase.
Contents
L1 norm loss: minimizes |
|
MSE loss with top-k truncation: |
|
Marker protocol for loss types. |
|
Compute scalar loss for a single image under the given circuit. |
|
Keep the k coefficients with largest absolute value; zero the rest. |