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

Method free_energy

code/rbm.py:130–135  ·  view source on GitHub ↗

Function to compute the free energy

(self, v_sample)

Source from the content-addressed store, hash-verified

128 # end-snippet-1
129
130 def free_energy(self, v_sample):
131 ''' Function to compute the free energy '''
132 wx_b = T.dot(v_sample, self.W) + self.hbias
133 vbias_term = T.dot(v_sample, self.vbias)
134 hidden_term = T.sum(T.log(1 + T.exp(wx_b)), axis=1)
135 return -hidden_term - vbias_term
136
137 def propup(self, vis):
138 '''This function propagates the visible units activation upwards to

Callers 2

get_cost_updatesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected