<s> import numpy as np <EOL> import theano <EOL> def shared_normal ( num_rows , num_cols , scale = <NUM_LIT> ) : <EOL> '''<STR_LIT>''' <EOL> return theano . shared ( np . random . normal ( <EOL> scale = scale , size = ( num_rows , num_cols ) ) . astype ( theano . config . floatX ) ) <EOL> def shared_normal_vector ( num_rows , scale = <NUM_LIT> ) : <EOL> '''<STR_LIT>''' <EOL> return theano . shared ( np . random . normal ( <EOL> scale = scale , size = ( num_rows ) ) . astype ( theano . config . floatX ) ) <EOL> def shared_zeros ( * shape ) : <EOL> '''<STR_LIT>''' <EOL> return theano . shared ( np . zeros ( shape , dtype = theano . config . floatX ) ) <EOL> def sigmoid ( z ) : <EOL> s = <NUM_LIT:1.0> / ( <NUM_LIT:1.0> + np . exp ( - <NUM_LIT:1.0> * z ) ) <EOL> return s </s>
