class_docstr: An object detector model which can be trained using Model Maker's training API.
  
  Attributes:
    loss_trackers: List of tf.keras.metrics.Mean objects used to track the loss
      during training.
docstr: Overrides train_step from tf.keras.Model.
docstr_tok: ["Overrides","train_step","from","tf.keras.Model","."]
code: def train_step(self, data):
      """Overrides train_step from tf.keras.Model."""
      tf.keras.backend.set_learning_phase(1)
      x, y = data
      # Run forward pass.
      with tf.GradientTape() as tape:
          y_pred = self(x, training=True)
          loss = self.compute_loss(x, y, y_pred)
      self._validate_target_and_loss(y, loss)
      # Run backwards pass.
      self.optimizer.minimize(loss, self.trainable_variables, tape=tape)
      return self.compute_metrics(x, y, y_pred)
  
imports: import os
  from typing import Mapping, Optional, Sequence, Union
  import tensorflow
  from mediapipe.model_maker.python.vision.object_detector import detection
  from mediapipe.model_maker.python.vision.object_detector import model_options
  from mediapipe.model_maker.python.vision.object_detector import model_spec
  from official.core import config_definitions
  from official.projects.qat.vision.configs import common
  from official.projects.qat.vision.modeling import factory
  from official.vision import configs
  from official.vision.losses import focal_loss
  from official.vision.losses import loss_utils
  from official.vision.modeling import factory
  from official.vision.modeling import retinanet_model
  from official.vision.modeling.layers import detection_generator
label_desc: Use image node_id 12 for calling the ObjectDetectorModel obj's underlying member method code with example usage: obj.train_step(data) and returns: self