jensandClaude Sonnet 5 eb29e33b81 Fix Bernoulli-only sample() applied to Gaussian visible/hidden units
Matutils::sample() always binary-thresholds (src > uniform(src)), but it
was the only sampler in the codebase and was called unconditionally on
h_probs/v_probs/miniBatch in several CD Gibbs-loop branches regardless
of doGaussianVisible/doGaussianHidden. Binary-thresholding a Gaussian
unit's continuous activation is meaningless -- it would corrupt any
Gaussian-visible/hidden RBM (image-domain experiments via the GUI or
TEST target); doesn't affect poet's plain BB-RBM path since both flags
are false there.

Add sample_gaussian() (mean + N(0,1) noise) alongside the existing
Bernoulli sample() in matutils.hpp, plus Rbm::sampleVisible/sampleHidden
helpers that dispatch to the right one per the RBM's configured type.
Replace every visible/hidden Gibbs-step sample() call in cd_jens (the
active path) and cd_hinton (compiled but currently unused, behind
USE_CD_HINTON) with the appropriate dispatch helper, and fix the same
issue in Rbm::train's doSampleBatch path.

Behavior is unchanged for any RBM with doGaussianVisible/doGaussianHidden
both false (confirmed: poet.elf f output identical before/after).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016K8Gu7Qejd11JbdiHZqYAs
2026-07-27 13:45:03 +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%