You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I am learning your RBM python code. All codes are OK except the updating formula of parameters used in your contrastive_divergence function. I found that the bias vectors are updated using the mean gradient of a batch training examples, while the weight matrix is not such the case. Hence, can kindly you give some explanation about the equation (Line 61-62) in details. I am looking forward your early replay.
The text was updated successfully, but these errors were encountered:
I think maybe the following equation is right:
self.W += lr * sum([ np.dot(self.input[i,:].T, ph_mean[i,:]) - np.dot(self.nv_samples[i,:].T, nh_mean[i,:]) for i in range(self.input.shape[0]) ]) / self.input.shape[0]
Recently, I am learning your RBM python code. All codes are OK except the updating formula of parameters used in your contrastive_divergence function. I found that the bias vectors are updated using the mean gradient of a batch training examples, while the weight matrix is not such the case. Hence, can kindly you give some explanation about the equation (Line 61-62) in details. I am looking forward your early replay.
The text was updated successfully, but these errors were encountered: