parameters: (x)
return_statement: return x.eval(session=get_session((x,)))
docstring: Returns the value of a variable.
  
    Arguments:
        x: input variable.
  
    Returns:
        A Numpy array.
docstring_summary: Returns the value of a variable.
docstring_tokens: Returns the value of a variable .
function: def get_value(x):
    """Returns the value of a variable.
  
    Arguments:
        x: input variable.
  
    Returns:
        A Numpy array.
    """
    if not tensor_util.is_tensor(x):
      return x
    if context.executing_eagerly():
      return x.numpy()
    if not getattr(x, '_in_graph_mode', True):
      # This is a variable which was created in an eager context, but is being
      # evaluated from a Graph.
      with context.eager_mode():
        return x.numpy()
  
    if ops.executing_eagerly_outside_functions():
      # This method of evaluating works inside the Keras FuncGraph.
      return function([], x)(x)
  
    return x.eval(session=get_session((x,)))
function_tokens: def get_value ( x ) : if not tensor_util . is_tensor ( x ) : return x if context . executing_eagerly ( ) : return x . numpy ( ) if not getattr ( x , '_in_graph_mode' , True ) : # This is a variable which was created in an eager context, but is being # evaluated from a Graph. with context . eager_mode ( ) : return x . numpy ( ) if ops . executing_eagerly_outside_functions ( ) : # This method of evaluating works inside the Keras FuncGraph. return function ( [ ] , x ) ( x ) return x . eval ( session = get_session ( ( x , ) ) )