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: Set attribute, i.e. self.name = value
  
  This reloading prevent the teacher model from being registered as a
  nn.Module. The teacher module is registered as a plain object, so that
  the teacher parameters will not show up when calling
  ``self.parameters``, ``self.modules``, ``self.children`` methods.
docstr_tok: ["Set","attribute",",","i.e",".","self.name","=","value","This","reloading","prevent","the","teacher","model","from","being","registered","as","a","nn.Module",".","The","teacher","module","is","registered","as","a","plain","object",",","so","that","the","teacher","parameters","will","not","show","up","when","calling","``","self.parameters","``",",","``","self.modules","``",",","``","self.children","``","methods","."]
code: def __setattr__(self, name: str, value: Any) -> None:
      """Set attribute, i.e. self.name = value
  
      This reloading prevent the teacher model from being registered as a
      nn.Module. The teacher module is registered as a plain object, so that
      the teacher parameters will not show up when calling
      ``self.parameters``, ``self.modules``, ``self.children`` methods.
      """
      if name == "teacher_model":
          object.__setattr__(self, name, value)
      else:
          super().__setattr__(name, value)
  
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 6 for calling the KnowledgeDistillationSingleStageDetector obj's underlying member method code with example usage: obj.__setattr__(name, value) without return types