<s> import numpy as np <EOL> import theano <EOL> def intX ( X ) : <EOL> return np . asarray ( X , dtype = np . int32 ) <EOL> def floatX ( X ) : <EOL> return np . asarray ( X , dtype = theano . config . floatX ) <EOL> def sharedX ( X , dtype = theano . config . floatX , name = None ) : <EOL> return theano . shared ( np . asarray ( X , dtype = dtype ) , name = name ) <EOL> def shared0s ( shape , dtype = theano . config . floatX , name = None ) : <EOL> return sharedX ( np . zeros ( shape ) , dtype = dtype , name = name ) <EOL> def sharedNs ( shape , n , dtype = theano . config . floatX , name = None ) : <EOL> return sharedX ( np . ones ( shape ) * n , dtype = dtype , name = name ) <EOL> def downcast_float ( X ) : <EOL> return np . asarray ( X , dtype = np . float32 ) </s>
