class_docstr: ByteTrack: Multi-Object Tracking by Associating Every Detection Box.
  
  This multi object tracker is the implementation of `ByteTrack
  <https://arxiv.org/abs/2110.06864>`_.
  
  Args:
      detector (dict): Configuration of detector. Defaults to None.
      tracker (dict): Configuration of tracker. Defaults to None.
      data_preprocessor (dict or ConfigDict, optional): The pre-process
         config of :class:`TrackDataPreprocessor`.  it usually includes,
          ``pad_size_divisor``, ``pad_value``, ``mean`` and ``std``.
      init_cfg (dict or list[dict]): Configuration of initialization.
          Defaults to None.
docstr: Calculate losses from a batch of inputs and data samples.
  
  Args:
      inputs (Tensor): of shape (N, C, H, W) encoding
          input images. Typically these should be mean centered and std
          scaled. The N denotes batch size
      data_samples (list[:obj:`DetDataSample`]): The batch
          data samples. It usually includes information such
          as `gt_instance`.
  
  Returns:
      dict: A dictionary of loss components.
docstr_tok: ["Calculate","losses","from","a","batch","of","inputs","and","data","samples",".","Args",":","inputs","(","Tensor",")",":","of","shape","(","N",",","C",",","H",",","W",")","encoding","input","images",".","Typically","these","should","be","mean","centered","and","std","scaled",".","The","N","denotes","batch","size","data_samples","(","list","[",":","obj",":","`","DetDataSample","`","]",")",":","The","batch","data","samples",".","It","usually","includes","information","such","as","`","gt_instance","`",".","Returns",":","dict",":","A","dictionary","of","loss","components","."]
code: def loss(
      self, inputs: Tensor, data_samples: SampleList, **kwargs
  ) -> dict:
      """Calculate losses from a batch of inputs and data samples.
  
      Args:
          inputs (Tensor): of shape (N, C, H, W) encoding
              input images. Typically these should be mean centered and std
              scaled. The N denotes batch size
          data_samples (list[:obj:`DetDataSample`]): The batch
              data samples. It usually includes information such
              as `gt_instance`.
  
      Returns:
          dict: A dictionary of loss components.
      """
      return self.detector.loss(inputs, data_samples, **kwargs)
  
file_path: mmdetection/mmdet/models/mot/bytetrack.py
imports: from typing import Dict, Optional
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList, TrackSampleList
  from mmdet.utils import OptConfigType, OptMultiConfig
  from .base import BaseMOTModel
label_desc: Use image node_id 2 for calling the ByteTrack obj's underlying member method code with example usage: obj.loss(inputs, data_samples) and returns: self