#NEWLINE# def _dropout_from_layer( theano_rng , hid_out , p ) : #NEWLINE# #INDENT# ' p is the factor for dropping a unit ' #NEWLINE# return ( theano_rng . binomial ( n = 1 , p = ( 1 - p ) , size = hid_out . shape , dtype = theano . config . floatX ) * p )