'Sample the visible units from the hidden units.
This is the Negative phase of the Contrastive Divergence algorithm.
:param hidden: activations of the hidden units
:param n_features: number of features
:return: visible probabilities'

def sample_visible_from_hidden(self, hidden, n_features):

    visible_activation = tf.add(tf.matmul(hidden, tf.transpose(self.W)), self.bv_)
    if (self.visible_unit_type == 'bin'):
        vprobs = tf.nn.sigmoid(visible_activation)
    elif (self.visible_unit_type == 'gauss'):
        vprobs = tf.truncated_normal((1, n_features), mean=visible_activation, stddev=self.stddev)
    else:
        vprobs = None
    return vprobs
