code: def __init__(self, name=""):
      self._names = [name]
      # if graph is finalized, savers must have already already been added. This happens
      # in the case of a MonitoredSession
      self._variables = tf.global_variables()
  
      # target network is never saved or restored directly from checkpoint, so we are removing all its variables from the list
      # the target network would be synched back from the online network in graph_manager.improve(...), at the beginning of the run flow.
      self._variables = [
          v for v in self._variables if "/target" not in v.name
      ]
  
      # Using a placeholder to update the variable during restore to avoid memory leak.
      # Ref: https://github.com/tensorflow/tensorflow/issues/4151
      self._variable_placeholders = []
      self._variable_update_ops = []
      for v in self._variables:
          variable_placeholder = tf.placeholder(
              v.dtype, shape=v.get_shape()
          )
          self._variable_placeholders.append(variable_placeholder)
          self._variable_update_ops.append(
              v.assign(variable_placeholder)
          )
  
      self._saver = tf.train.Saver(self._variables, max_to_keep=None)
  
file_path: coach/rl_coach/architectures/tensorflow_components/savers.py
imports: import pickle
  from typing import Any, List, Dict
  import tensorflow
  import numpy
  from rl_coach.saver import Saver
label_desc: Use image node_id 1 to create a new GlobalVariableSaver object from inherited base classes: Saver with example: obj = GlobalVariableSaver(name)