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

Method gibbs_vhv

code/rbm.py:200–206  ·  view source on GitHub ↗

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

(self, v0_sample)

Source from the content-addressed store, hash-verified

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,
202 starting from the visible state'''
203 pre_sigmoid_h1, h1_mean, h1_sample = self.sample_h_given_v(v0_sample)
204 pre_sigmoid_v1, v1_mean, v1_sample = self.sample_v_given_h(h1_sample)
205 return [pre_sigmoid_h1, h1_mean, h1_sample,
206 pre_sigmoid_v1, v1_mean, v1_sample]
207
208 # start-snippet-2
209 def get_cost_updates(self, lr=0.1, persistent=None, k=1):

Callers

nothing calls this directly

Calls 2

sample_h_given_vMethod · 0.95
sample_v_given_hMethod · 0.95

Tested by

no test coverage detected