def shared_empty(dim=2, dtype=None):
 if (dtype is None):
  dtype = theano.config.floatX
 shp = tuple(([1] * dim))
 return theano.shared(np.zeros(shp, dtype=dtype))

def shared_empty ( dim = 2 , dtype = None ) : if ( dtype is None ) : dtype = theano . config . floatX shp = tuple ( ( [ 1 ] * dim ) ) return theano . shared ( np . zeros ( shp , dtype = dtype ) )
creates empty theano shared variable .