2f9fe1b66b68867ddecb9e8ef288d77a34625ba6
train.py: add _to_gpu() helper; convert mini-batches from CPU numpy to GPU CuPy on the fly so large datasets can stay in RAM. Use numpy permutation for numpy batches during shuffle. Limit status err_rms to first 5000 samples to avoid GPU OOM on status checks. model.py: replace np.copy() with np.array() — cupy.copy() does not convert numpy arrays to CuPy; cupy.array() does. Fixes entity.forward() crash after training when batch was passed as numpy. test_faces_sub_image.py: load_patches normalizes on CPU and returns numpy, avoiding multi-copy GPU OOM for large datasets (500 images ≈ 1.4 GB). show_reconstructions converts numpy patches to CuPy before inference. Add --n_images CLI arg. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GRBM
Paper
https://medium.com/@rtdcunha/gaussian-bernoulli-restricted-boltzmann-machines-4a68b8765485 https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0171015&type=printable
Code
https://github.com/DSL-Lab/GRBM/tree/main
CRBM
Paper
https://www.ee.nthu.edu.tw/hchen/pubs/iee2003.pdf
Regularization
https://benihime91.github.io/blog/machinelearning/deeplearning/python3.x/tensorflow2.x/2020/10/08/adamW.html https://medium.com/analytics-vidhya/l1-vs-l2-regularization-which-is-better-d01068e6658c https://jamesmccaffreyblog.com/2019/05/09/the-difference-between-neural-network-l2-regularization-and-weight-decay
Languages
Jupyter Notebook
96.9%
Python
3.1%