class_docstr: LocalGradientAggregationHelper aggregates gradient updates locally,
  and communicates the updates across machines only once every
  backward_passes_per_step. Only supports graph mode execution.
class_docstr_tok: ["LocalGradientAggregationHelper","aggregates","gradient","updates","locally",",","and","communicates","the","updates","across","machines","only","once","every","backward_passes_per_step",".","Only","supports","graph","mode","execution","."]
code: def _clear_grads(self):
      clear_ops_list = []
      for idx, grad_aggregator in enumerate(
          self.locally_aggregated_grads
      ):
          clear_op = grad_aggregator.assign(
              grad_aggregator.initial_value
          )
          clear_ops_list.append(clear_op)
      return tf.group(*clear_ops_list)
  
file_path: horovod/horovod/tensorflow/gradient_aggregation.py
imports: import os
  import tensorflow
  from packaging import version
  from horovod.tensorflow.mpi_ops import size_op
  from horovod.tensorflow.mpi_ops import global_process_set
label_desc: Use image node_id 5 for calling the LocalGradientAggregationHelper obj's underlying member method code with example usage: obj._clear_grads() and returns: tf