class_docstr: Implementation of `Distilling the Knowledge in a Neural Network.
  <https://arxiv.org/abs/1503.02531>`_.
  
  Args:
      backbone (:obj:`ConfigDict` or dict): The backbone module.
      neck (:obj:`ConfigDict` or dict): The neck module.
      bbox_head (:obj:`ConfigDict` or dict): The bbox head module.
      teacher_config (:obj:`ConfigDict` | dict | str | Path): Config file
          path or the config object of teacher model.
      teacher_ckpt (str, optional): Checkpoint path of teacher model.
          If left as None, the model will not load any weights.
          Defaults to True.
      eval_teacher (bool): Set the train mode for teacher.
          Defaults to True.
      train_cfg (:obj:`ConfigDict` or dict, optional): The training config
          of ATSS. Defaults to None.
      test_cfg (:obj:`ConfigDict` or dict, optional): The testing config
          of ATSS. Defaults to None.
      data_preprocessor (:obj:`ConfigDict` or dict, optional): Config of
          :class:`DetDataPreprocessor` to process the input data.
          Defaults to None.
class_docstr_tok: ["Implementation","of","`","Distilling","the","Knowledge","in","a","Neural","Network",".","<","https",":","\/\/arxiv.org\/abs\/1503.02531",">","`","_",".","Args",":","backbone","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","backbone","module",".","neck","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","neck","module",".","bbox_head","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","bbox","head","module",".","teacher_config","(",":","obj",":","`","ConfigDict","`","|","dict","|","str","|","Path",")",":","Config","file","path","or","the","config","object","of","teacher","model",".","teacher_ckpt","(","str",",","optional",")",":","Checkpoint","path","of","teacher","model",".","If","left","as","None",",","the","model","will","not","load","any","weights",".","Defaults","to","True",".","eval_teacher","(","bool",")",":","Set","the","train","mode","for","teacher",".","Defaults","to","True",".","train_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","The","training","config","of","ATSS",".","Defaults","to","None",".","test_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","The","testing","config","of","ATSS",".","Defaults","to","None",".","data_preprocessor","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","Config","of",":","class",":","`","DetDataPreprocessor","`","to","process","the","input","data",".","Defaults","to","None","."]
docstr: Since teacher_model is registered as a plain object, it is necessary
  to put the teacher model to other device when calling ``to``
  function.
docstr_tok: ["Since","teacher_model","is","registered","as","a","plain","object",",","it","is","necessary","to","put","the","teacher","model","to","other","device","when","calling","``","to","``","function","."]
code: def to(self, device: Optional[str] = None) -> nn.Module:
      """Since teacher_model is registered as a plain object, it is necessary
      to put the teacher model to other device when calling ``to``
      function."""
      self.teacher_model.to(device=device)
      return super().to(device=device)
  
file_path: mmdetection/mmdet/models/detectors/kd_one_stage.py
imports: from pathlib import Path
  from typing import Any, Optional, Union
  import torch
  import torch.nn
  from mmengine.config import Config
  from mmengine.runner import load_checkpoint
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.utils import ConfigType, OptConfigType
  from .single_stage import SingleStageDetector
label_desc: Use image node_id 4 for calling the KnowledgeDistillationSingleStageDetector obj's underlying member method code with example usage: obj.to(device) and returns: super