class_docstr: Callback triggered before and after a training step.
docstr: Initializes the callback with a `supervised.training.Loop` instance.
docstr_tok: ["Initializes","the","callback","with","a","`","supervised.training.Loop","`","instance","."]
code: def __init__(self, loop):
      """Initializes the callback with a `supervised.training.Loop` instance."""
      self._loop = loop
  
imports: import collections
  import os
  import gin
  import numpy
  from trax import jaxboard
  from trax import layers
  from trax import shapes
  from trax.rl import serialization_utils
  from trax.supervised import decoding
label_desc: Use image node_id 1 to create a new TrainingStepCallback object  with example: obj = TrainingStepCallback(loop)