def shared_like(variable, name=None, **kwargs):
 variable = tensor.as_tensor_variable(variable)
 if (name is None):
  name = 'shared_{}'.format(variable.name)
 return theano.shared(numpy.zeros(((0,) * variable.ndim), dtype=variable.dtype), name=name, **kwargs)

def shared_like ( variable , name = None , ** kwargs ) : variable = tensor . as_tensor_variable ( variable ) if ( name is None ) : name = 'shared_{}' . format ( variable . name ) return theano . shared ( numpy . zeros ( ( ( 0 , ) * variable . ndim ) , dtype = variable . dtype ) , name = name , ** kwargs )
construct a shared variable to hold the value of a tensor variable .