#NEWLINE# def get_output_for( self , input , deterministic = False , * args , **kwargs ) : #NEWLINE# #INDENT# if ( deterministic or ( self . p == 0 ) ) : #NEWLINE# #INDENT# return input #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# retain_prob = ( 1 - self . p ) #NEWLINE# input *= np . float32 ( self . rescale ) #NEWLINE# input_shape = self . input_layer . get_output_shape ( ) #NEWLINE# if any ( ( ( s is None ) for s in input_shape ) ) : #NEWLINE# #INDENT# input_shape = input . shape #NEWLINE# #UNINDENT# return ( input * _srng . binomial ( input_shape , p = retain_prob , dtype = theano . config . floatX ) )