Rbm::Train(cd_bb): added do_gibbs_sample_hidden

This commit is contained in:
2026-06-07 17:48:22 +02:00
parent 2d3361d5ce
commit 0febd4e6b6
+3
View File
@@ -49,6 +49,9 @@ def cd_binary_binary(entity: Entity, data_pos: Mat):
# Gibbs sampling
for _ in range(params.num_gibbs_samples-1):
if params.do_gibbs_sample_hidden:
h_probs_neg = sample(h_probs_neg)
data_neg = prob(entity.v_given_h(h_probs_neg))
h_probs_neg = prob(entity.h_given_v(data_neg))