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
# If probabilities are higher than randomly generated, the states are 1
randoms = rand.rand(batch_size, self.num_hid)
pos_hid = array(randoms < pos_hid_prob, dtype=int)
# Negative phase - generate data from hidden to visible units and then again to hidden units.
neg_vis = pos_vis
neg_hid_prob = pos_hid
for i in range(self.gibbs_steps): # There is only 1 step of contrastive divergence
neg_vis, neg_hid_prob, D, p = self.__contrastive_divergence_rsm__(neg_vis, pos_hid_prob, D)
if i == 0:
perplexity += p
It doesn't not look like pos_hid is actually being used. It looks like it is being assigned to neg_hid_prob which is then immediately overwritten by the contrastive divergence output. Or is pos_hid being used somewhere else?
Perhaps pos_hid should have been passed to __contrastive_divergence_rsm__ rather than pos_hid_prob such that the visible layer is being reconstructed from the binarized hidden layer rather than the probabilities?
The text was updated successfully, but these errors were encountered:
# Negative phase - generate data from hidden to visible units and then again to hidden units.
neg_vis = pos_vis
neg_hid_prob = pos_hid
for i in range(self.gibbs_steps): # There is only 1 step of contrastive divergence
neg_vis, neg_hid_prob, D, p = self.__contrastive_divergence_rsm__(neg_vis, pos_hid_prob, D)
if i == 0:
perplexity += p
It doesn't not look like pos_hid is actually being used. It looks like it is being assigned to neg_hid_prob which is then immediately overwritten by the contrastive divergence output. Or is pos_hid being used somewhere else?
Perhaps pos_hid should have been passed to contrastive_divergence_rsm rather than pos_hid_prob such that the visible layer is being reconstructed from the binarized hidden layer?
—
Reply to this email directly or view it on GitHub #5.
In the following code in
def rsm_learn
It doesn't not look like
pos_hid
is actually being used. It looks like it is being assigned toneg_hid_prob
which is then immediately overwritten by the contrastive divergence output. Or ispos_hid
being used somewhere else?Perhaps
pos_hid
should have been passed to__contrastive_divergence_rsm__
rather thanpos_hid_prob
such that the visible layer is being reconstructed from the binarized hidden layer rather than the probabilities?The text was updated successfully, but these errors were encountered: