Files
Rbm/source
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
..
2024-01-22 12:26:03 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 13:55:51 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 12:26:03 +01:00
2026-07-26 21:49:32 +02:00
2024-01-22 13:55:51 +01:00
2024-02-01 19:03:13 +01:00
2024-02-03 09:49:13 +01:00
2024-01-22 13:55:51 +01:00
2024-01-22 13:55:51 +01:00
2026-07-26 21:49:32 +02:00
2022-01-18 20:14:56 +00:00
2022-01-17 18:40:50 +00:00