Regularizer for L1 and L2 regularization.
Adds a term to the loss to penalize large weights: loss += sum(l1 * abs(x)) + sum(l2 * x^2)
Optional
Generated using TypeDoc
Regularizer for L1 and L2 regularization.
Adds a term to the loss to penalize large weights: loss += sum(l1 * abs(x)) + sum(l2 * x^2)