(scope=None, strip_scope=False)
Returns a list of variables to restore for the specified list of methods.

  It is supposed that variable name starts with the method's scope (a prefix
  returned by _method_scope function).

  Args:
    methods_names: a list of names of configurable methods.
    strip_scope: if True will return variable names without method's scope.
      If methods_names is None will return names unchanged.
    model_scope: a scope for a whole model.

  Returns:
    a dictionary mapping variable names to variables for restore.
Returns a list of variables to restore for the specified list of methods.
Returns a list of variables to restore for the specified list of methods .
def variables_to_restore(scope=None, strip_scope=False):
  """Returns a list of variables to restore for the specified list of methods.

  It is supposed that variable name starts with the method's scope (a prefix
  returned by _method_scope function).

  Args:
    methods_names: a list of names of configurable methods.
    strip_scope: if True will return variable names without method's scope.
      If methods_names is None will return names unchanged.
    model_scope: a scope for a whole model.

  Returns:
    a dictionary mapping variable names to variables for restore.
  """
  if scope:
    variable_map = {}
    method_variables = slim.get_variables_to_restore(include=[scope])
    for var in method_variables:
      if strip_scope:
        var_name = var.op.name[len(scope) + 1:]
      else:
        var_name = var.op.name
      variable_map[var_name] = var

    return variable_map
  else:
    return {v.op.name: v for v in slim.get_variables_to_restore()}
def variables_to_restore ( scope = None , strip_scope = False ) : if scope : variable_map = { } method_variables = slim . get_variables_to_restore ( include = [ scope ] ) for var in method_variables : if strip_scope : var_name = var . op . name [ len ( scope ) + 1 : ] else : var_name = var . op . name variable_map [ var_name ] = var return variable_map else : return { v . op . name : v for v in slim . get_variables_to_restore ( ) }