class_docstr: Run ops from the collection UPDATE_OPS every step.
  The ops will be hooked to ``trainer.hooked_sess`` and run along with
  each ``hooked_sess.run`` call.
  
  Be careful when using ``UPDATE_OPS`` if your model contains more than one sub-networks.
  Perhaps not all updates are supposed to be executed in every iteration.
  
  This callback is one of the :func:`DEFAULT_CALLBACKS()`.
class_docstr_tok: ["Run","ops","from","the","collection","UPDATE_OPS","every","step",".","The","ops","will","be","hooked","to","``","trainer.hooked_sess","``","and","run","along","with","each","``","hooked_sess.run","``","call",".","Be","careful","when","using","``","UPDATE_OPS","``","if","your","model","contains","more","than","one","sub-networks",".","Perhaps","not","all","updates","are","supposed","to","be","executed","in","every","iteration",".","This","callback","is","one","of","the",":","func",":","`","DEFAULT_CALLBACKS","(",")","`","."]
docstr: Args:
      collection (str): collection of ops to run. Defaults to ``tf.GraphKeys.UPDATE_OPS``
docstr_tok: ["Args",":","collection","(","str",")",":","collection","of","ops","to","run",".","Defaults","to","``","tf.GraphKeys.UPDATE_OPS","``"]
code: def __init__(self, collection=None):
      """
      Args:
          collection (str): collection of ops to run. Defaults to ``tf.GraphKeys.UPDATE_OPS``
      """
      if collection is None:
          collection = tf.GraphKeys.UPDATE_OPS
      name = (
          "UPDATE_OPS"
          if collection == tf.GraphKeys.UPDATE_OPS
          else collection
      )
  
      def f():
          ops = tf.get_collection(collection)
          if ops:
              logger.info(
                  "Applying collection {} of {} ops.".format(
                      name, len(ops)
                  )
              )
              return tf.group(*ops, name="update_ops")
          else:
              return tf.no_op(name="empty_update_ops")
  
      super(RunUpdateOps, self).__init__(
          f, run_before=False, run_as_trigger=False, run_step=True
      )
  
imports: import numpy
  import os
  from ..compat import tfv1
  from ..tfutils.common import get_op_tensor_name
  from ..utils import logger
  from .base import Callback
label_desc: Use image node_id 1 to create a new RunUpdateOps object from inherited base classes: RunOp with example: obj = RunUpdateOps(collection)