class_docstr: EfficientDet keras network with train and test step.
code: def train_step(self, inputs):
      config = self.config
  
      features, labels = self._unpack_inputs(inputs)
  
      with tf.GradientTape() as tape:
          cls_out_list, box_out_list = self.call(
              features, training=True
          )
          cls_outputs, box_outputs = self._unpack_outputs(
              cls_out_list, box_out_list
          )
  
          # cls_loss and box_loss are for logging. only total_loss is optimized.
          det_loss, cls_loss, box_loss = losses.detection_loss(
              cls_outputs, box_outputs, labels, config
          )
          reg_l2loss = self._reg_l2_loss(config.weight_decay)
          total_loss = det_loss + reg_l2loss
  
      trainable_vars = self._freeze_vars()
      gradients = tape.gradient(total_loss, trainable_vars)
  
      if config.clip_gradients_norm:
          clip_norm = abs(config.clip_gradients_norm)
          gradients = [
              tf.clip_by_norm(g, clip_norm) if g is not None else None
              for g in gradients
          ]
          gradients, _ = tf.clip_by_global_norm(gradients, clip_norm)
  
      self.optimizer.apply_gradients(zip(gradients, trainable_vars))
  
      self.train_metrics.mean_loss_tracker.update_state(total_loss)
      self.train_metrics.loss_tracker.reset_states()
      self.train_metrics.loss_tracker.update_state(total_loss)
      self.train_metrics.lr_tracker.reset_states()
      self.train_metrics.lr_tracker.update_state(
          self.optimizer.lr(self.optimizer.iterations)
      )
  
      return {m.name: m.result() for m in self.train_metrics}
  
imports: import functools
  from absl import logging
  import tensorflow
  import hparams_config
  import utils
  from .backbone import efficientnet_builder
  from .utils import postprocess
  from .utils import layers
  from .utils import losses
  import re
label_desc: Use image node_id 8 for calling the EfficientDetNet obj's underlying member method code with example usage: obj.train_step(inputs) and returns: unknown