class_docstr: Base class of solver.
class_docstr_tok: ["Base","class","of","solver","."]
docstr: Get the saver.
docstr_tok: ["Get","the","saver","."]
code: def get_saver(self, global_step=None):
      """Get the saver."""
      solverconf = self.config["solver"]
      max_to_keep = solverconf["saver"]["max_to_keep"]
      model_avg_conf = self.config["solver"]["model_average"]
      model_average = model_avg_conf["enable"]
      if model_average:
          var_avg_decay = model_avg_conf["var_avg_decay"]
          variable_averages = self.get_var_avg_ema(
              var_avg_decay, global_step
          )
          variable_to_restore = variable_averages.variables_to_restore()
          logging.info(
              "Restore: name to var : {}".format(variable_to_restore)
          )
          saver = tf.train.Saver(
              variable_to_restore, max_to_keep=max_to_keep
          )
          logging.info("Restore vars from moving variables")
      else:
          saver = tf.train.Saver(max_to_keep=max_to_keep)
      return saver
  
imports: import abc
  import math
  import delta.compat
  import tensorflow_addons
  from absl import logging
  from delta import utils
  from delta.utils import optimizer
  from delta.utils.register import registers
label_desc: Use image node_id 15 for calling the Solver obj's underlying member method code with example usage: obj.get_saver(global_step) and returns: saver