def _fetch_var(name, scope=None, return_numpy=True):
    '\n    Fetch the value of the variable with the given name from the\n    given scope.\n\n    Args:\n        name(str): name of the variable. Typically, only persistable variables\n            can be found in the scope used for running the program.\n        scope(core.Scope|None): scope object. It should be the scope where\n            you pass to Executor.run() when running your program.\n            If None, global_scope() will be used. Default None.\n        return_numpy(bool): whether convert the tensor to numpy.ndarray.\n            Default True.\n\n    Returns:\n       LodTensor|numpy.ndarray\n    '
    assert isinstance(name, str)
    if (scope is None):
        scope = global_scope()
    assert isinstance(scope, core._Scope)
    var = scope.find_var(name)
    assert (var is not None), (('Cannot find ' + name) + ' in scope. Perhaps you need to make the variable persistable by using var.persistable = True in your program.')
    tensor = var.get_tensor()
    if return_numpy:
        tensor = as_numpy(tensor)
    return tensor
Fetch the value of the variable with the given name from the
given scope.

Args:
    name(str): name of the variable. Typically, only persistable variables
        can be found in the scope used for running the program.
    scope(core.Scope|None): scope object. It should be the scope where
        you pass to Executor.run() when running your program.
        If None, global_scope() will be used. Default None.
    return_numpy(bool): whether convert the tensor to numpy.ndarray.
        Default True.

Returns:
   LodTensor|numpy.ndarray
def _fetch_var(name, scope=None, return_numpy=True):
    '\n    Fetch the value of the variable with the given name from the\n    given scope.\n\n    Args:\n        name(str): name of the variable. Typically, only persistable variables\n            can be found in the scope used for running the program.\n        scope(core.Scope|None): scope object. It should be the scope where\n            you pass to Executor.run() when running your program.\n            If None, global_scope() will be used. Default None.\n        return_numpy(bool): whether convert the tensor to numpy.ndarray.\n            Default True.\n\n    Returns:\n       LodTensor|numpy.ndarray\n    '
    assert isinstance(name, str)
    if (scope is None):
        scope = global_scope()
    assert isinstance(scope, core._Scope)
    var = scope.find_var(name)
    assert (var is not None), (('Cannot find ' + name) + ' in scope. Perhaps you need to make the variable persistable by using var.persistable = True in your program.')
    tensor = var.get_tensor()
    if return_numpy:
        tensor = as_numpy(tensor)
    return tensor