Skip to content

Commit bbd5cf8

Browse files
authored
Update gbrbm.py
1 parent a2d17b4 commit bbd5cf8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

models/gbrbm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ def sample_v_given_h(self, h0_sample):
4545
v1_sample = GBRBM.sample_gaussian(v1_mean, self.sigma)
4646
return (v1_mean, v1_sample)
4747

48-
def propdown(self, h):
49-
"""Compute the sigmoid activation for visible units given hidden units"""
50-
return tf.nn.sigmoid(tf.matmul(h, tf.transpose(self.W)) / self.sigma**2 + self.vbias)
48+
def propup(self, v):
49+
"""Compute the sigmoid activation for hidden units given visible units"""
50+
return tf.nn.sigmoid(tf.matmul(v, self.W) / self.sigma**2 + self.hbias)
5151

5252
def free_energy(self, v_sample):
5353
"""Compute the free energy"""
@@ -91,4 +91,4 @@ def free_energy(self, v_sample):
9191
preds = sess.run(gbrbm.reconstruct(x), feed_dict={x: v})
9292
print(preds)
9393

94-
94+

0 commit comments

Comments
 (0)