def sample_hi_given(samples, i, W_list, b_list, beta=1.0):
 hi_mean = hi_given(samples, i, W_list, b_list, beta)
 hi_sample = theano_rng.binomial(size=samples[i].get_value().shape, n=1, p=hi_mean, dtype=floatX)
 return hi_sample

def sample_hi_given ( samples , i , W_list , b_list , beta = 1.0 ) : hi_mean = hi_given ( samples , i , W_list , b_list , beta ) hi_sample = theano_rng . binomial ( size = samples [ i ] . get_value ( ) . shape , n = 1 , p = hi_mean , dtype = floatX ) return hi_sample
given current state of our dbm .