def sample_hidden_from_visible(self, visible):
    ' Sample the hidden units from the visible units.\n        This is the Positive phase of the Contrastive Divergence algorithm.\n        :param visible: activations of the visible units\n        :return: tuple(hidden probabilities, hidden binary states)\n        '
    hprobs = tf.nn.sigmoid((tf.matmul(visible, self.W) + self.bh_))
    hstates = self.sample_prob(hprobs, self.hrand)
    return (hprobs, hstates)
Sample the hidden units from the visible units.
This is the Positive phase of the Contrastive Divergence algorithm.
:param visible: activations of the visible units
:return: tuple(hidden probabilities, hidden binary states)
def sample_hidden_from_visible(self, visible):
    ' Sample the hidden units from the visible units.\n        This is the Positive phase of the Contrastive Divergence algorithm.\n        :param visible: activations of the visible units\n        :return: tuple(hidden probabilities, hidden binary states)\n        '
    hprobs = tf.nn.sigmoid((tf.matmul(visible, self.W) + self.bh_))
    hstates = self.sample_prob(hprobs, self.hrand)
    return (hprobs, hstates)