class_docstr: Base class of solver.
class_docstr_tok: ["Base","class","of","solver","."]
docstr: average model variables, add average_op to UPDATES_OPS
docstr_tok: ["average","model","variables",",","add","average_op","to","UPDATES_OPS"]
code: def var_avg(self, global_step=None):
      """average model variables, add average_op to UPDATES_OPS"""
      model_avg_conf = self.config["solver"]["model_average"]
      var_avg_model = model_avg_conf["enable"]
      if var_avg_model:
          var_avg_decay = model_avg_conf["var_avg_decay"]
          variable_averages = self.get_var_avg_ema(
              var_avg_decay, global_step
          )
          apply_op = variable_averages.apply(tf.trainable_variables())
          tf.add_to_collection(tf.GraphKeys.UPDATE_OPS, apply_op)
          utils.log_vars("Avg Trainable Vars", tf.trainable_variables())
  
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 13 for calling the Solver obj's underlying member method code with example usage: obj.var_avg(global_step) without return types