class_docstr: Accumulates gradients during a fit() call when used in conjunction with the CustomOptimizer above.
class_docstr_tok: ["Accumulates","gradients","during","a","fit","(",")","call","when","used","in","conjunction","with","the","CustomOptimizer","above","."]
code: def on_batch_end(self, batch, logs=None):
      for g, w in zip(self.grads, self.model.trainable_weights):
          g += w.numpy()
      self.model.set_weights(self.og_weights)
  
imports: import logging
  import operator
  import os
  import shutil
  import sys
  from itertools import chain
  import numpy
  import tensorflow
  import tensorflow.keras.backend
  import wandb
  from wandb.sdk.integration_utils.data_logging import ValidationDataLogger
  from wandb.sdk.lib.deprecate import Deprecated, deprecate
  from wandb.util import add_import_hook
label_desc: Use image node_id 2 for calling the _GradAccumulatorCallback obj's underlying member method code with example usage: obj.on_batch_end(batch, logs) without return types