MCPcopy Index your code
hub / github.com/lisa-lab/DeepLearningTutorials / gibbs_hvh

Method gibbs_hvh

code/rbm.py:192–198  ·  view source on GitHub ↗

This function implements one step of Gibbs sampling, starting from the hidden state

(self, h0_sample)

Source from the content-addressed store, hash-verified

190 return [pre_sigmoid_v1, v1_mean, v1_sample]
191
192 def gibbs_hvh(self, h0_sample):
193 ''' This function implements one step of Gibbs sampling,
194 starting from the hidden state'''
195 pre_sigmoid_v1, v1_mean, v1_sample = self.sample_v_given_h(h0_sample)
196 pre_sigmoid_h1, h1_mean, h1_sample = self.sample_h_given_v(v1_sample)
197 return [pre_sigmoid_v1, v1_mean, v1_sample,
198 pre_sigmoid_h1, h1_mean, h1_sample]
199
200 def gibbs_vhv(self, v0_sample):
201 ''' This function implements one step of Gibbs sampling,

Callers

nothing calls this directly

Calls 2

sample_v_given_hMethod · 0.95
sample_h_given_vMethod · 0.95

Tested by

no test coverage detected