``` match r with | L1Reg l -> fun (w:DV) -> l * (DV.l1norm w) | L2Reg l -> fun w -> l * (DV.l2normSq w) | NoReg -> fun _ -> D 0.f ``` This regularization methods penalizes bias terms, as well. Bias terms should be excluded from being penalized.