jensandClaude Sonnet 5 aabf7385ce Fix RBM training: invert epoch/mini-batch loop nesting, drop duplicate CD computation
Rbm::train had mini-batch chunks as the outer loop and epochs as the
inner loop: each fixed, never-reshuffled slice of the data got all
numEpochs gradient steps back-to-back before ever being revisited, so
"numEpochs" didn't mean "passes over the whole dataset" and training
was biased toward whatever data came last. Invert the nesting (epochs
outer, mini-batches inner, batch reshuffled via arma::shuffle at the
start of each epoch) so every epoch is an actual full pass over the
data in a fresh random order.

Also drop a redundant toHiddenProbs(v_states) call in cd_jens: the
positive-phase hidden probabilities were computed once unconditionally
and then discarded, recomputed a second time with identical input in
two of the three sampling branches. Same result, half the cost, on
every mini-batch of every epoch of every layer.

Both only affect training; inference (step_forward/generation) is
unchanged, confirmed by identical poet.elf f output before and after.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016K8Gu7Qejd11JbdiHZqYAs
2026-07-27 13:39:58 +02:00
2026-07-26 21:49:32 +02:00
2024-01-22 13:55:51 +01:00
2022-06-28 19:20:04 +02:00
2026-07-26 21:49:32 +02:00
2024-01-21 14:06:27 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-01-21 14:11:25 +01:00
2024-03-04 09:00:16 +01:00
2024-02-03 09:06:13 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2022-06-28 19:20:04 +02:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2026-07-26 21:49:32 +02:00
2022-06-28 19:20:04 +02:00
2024-03-04 09:00:16 +01:00
2022-06-28 19:20:04 +02:00
2026-07-26 21:49:32 +02:00
2024-03-04 08:58:48 +01:00
2024-01-31 17:15:23 +01:00
2024-01-31 17:15:23 +01:00
2024-01-31 17:15:23 +01:00
2024-01-31 17:15:23 +01:00
2024-01-31 17:15:23 +01:00
2024-01-31 17:15:23 +01:00
2022-06-28 19:20:04 +02:00
2026-07-26 21:49:32 +02:00
2024-01-22 21:22:43 +01:00
2024-01-22 21:22:43 +01:00
2024-01-22 21:22:43 +01:00
2024-01-22 21:22:43 +01:00
2024-01-22 21:22:43 +01:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2026-07-26 21:50:50 +02:00
2022-01-20 18:53:10 +00:00
2024-03-04 09:00:16 +01:00
2024-03-04 08:58:48 +01:00
2024-03-04 08:58:48 +01:00
2024-03-04 08:58:48 +01:00
2024-01-23 21:05:39 +01:00
2024-02-02 19:14:32 +01:00
2022-06-28 19:20:04 +02:00
2026-07-26 21:49:32 +02:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
2024-03-04 09:00:16 +01:00
S
Description
No description provided
144 MiB
Languages
C++ 92.6%
C 4.2%
Makefile 2.8%
Shell 0.4%