jensandClaude Sonnet 4.6 abee870ada [bugfix] - fix L1 and L2 regularisation gradients in grad_compute
Previous code computed scalar norms and multiplied by W, giving gradients
that scaled with total weight magnitude rather than the correct per-element
derivatives:
  L1: gradient is λ·sign(W), not λ·‖W‖₁·W
  L2: gradient is 2λ·W, not λ·‖W‖₂²·W
Also removed the combined (l1+l2)*W term which incorrectly mixed the two.
weight_decay (correct L2 form λW) is kept as a separate term.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 18:26:06 +02:00
2025-12-19 11:11:00 +01:00
2026-01-11 11:23:35 +01:00
2026-01-10 21:44:03 +01:00
2025-12-19 15:20:04 +01:00
2026-01-11 11:23:35 +01:00
2026-01-10 19:58:39 +01:00
2025-12-18 07:56:45 +01:00
2026-01-06 18:00:26 +01:00
2025-12-16 21:46:00 +01:00
S
Description
Restricted Boltzmann Machine (RBM) for python
Readme
65 MiB
Languages
Jupyter Notebook 96.9%
Python 3.1%