def shared(value, name=None, strict=False, allow_downcast=None, **kwargs):
 try:
  if isinstance(value, Variable):
   raise TypeError('Shared variable constructor needs numeric values and not symbolic variables.')
  for ctor in reversed(shared.constructors):
   try:
    var = ctor(value, name=name, strict=strict, allow_downcast=allow_downcast, **kwargs)
    utils.add_tag_trace(var)
    return var
   except TypeError:
    continue
 except MemoryError as e:
  e.args = (e.args + ("you might consider using 'theano.shared(..., borrow=True)'",))
  raise
 raise TypeError(('No suitable SharedVariable constructor could be found. Are you sure all kwargs are supported? We do not support the parameter dtype or type. value="%s". parameters="%s"' % (value, kwargs)))

def shared ( value , name = None , strict = False , allow_downcast = None , ** kwargs ) : try : if isinstance ( value , Variable ) : raise TypeError ( 'Shared variable constructor needs numeric values and not symbolic variables.' ) for ctor in reversed ( shared . constructors ) : try : var = ctor ( value , name = name , strict = strict , allow_downcast = allow_downcast , ** kwargs ) utils . add_tag_trace ( var ) return var except TypeError : continue except MemoryError as e : e . args = ( e . args + ( "you might consider using 'theano.shared(..., borrow=True)'" , ) ) raise raise TypeError ( ( 'No suitable SharedVariable constructor could be found. Are you sure all kwargs are supported? We do not support the parameter dtype or type. value="%s". parameters="%s"' % ( value , kwargs ) ) )
return a sharedvariable variable .