class_docstr: Save profiles in specified step range to log directory.
code: def __init__(self, log_dir, start_step, stop_step, steps_per_epoch):
      super(ProfilerCallback, self).__init__()
      self.log_dir = log_dir
      self.start_step = start_step
      self.stop_step = stop_step
      self.start_epoch = start_step // steps_per_epoch
      self.stop_epoch = stop_step // steps_per_epoch
      self.start_step_in_epoch = start_step % steps_per_epoch
      self.stop_step_in_epoch = stop_step % steps_per_epoch
      self.should_start = False
      self.should_stop = False
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import time
  import tensorflow
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python import tf2
  from tensorflow.python.eager import profiler
label_desc: Use image node_id 1 to create a new ProfilerCallback object from inherited base classes: tf.keras.callbacks with example: obj = ProfilerCallback(log_dir, start_step, stop_step, steps_per_epoch)