class_docstr: Teacher-Student knowledge distillation helper.
  Use this object when training a model with KD and a teacher model.
  
  Args:
      teacher_model (TrainableModel): teacher model
      temperature (float, optional): KD temperature. Defaults to 1.0.
      dist_w (float, optional): distillation loss weight. Defaults to 0.1.
      loss_w (float, optional): student loss weight. Defaults to 1.0.
      loss_function (str, optional): loss function to use (kl for KLDivLoss,
          mse for MSELoss)
docstr: Add KD arguments to parser
  
  Args:
      parser (argparse.ArgumentParser): parser
code: def add_args(parser: argparse.ArgumentParser):
      """
      Add KD arguments to parser
  
      Args:
          parser (argparse.ArgumentParser): parser
      """
      parser.add_argument(
          "--teacher_model_path",
          type=str,
          required=True,
          help="Path to teacher model",
      )
      parser.add_argument(
          "--teacher_model_type",
          type=str,
          required=True,
          choices=TEACHER_TYPES,
          help="Teacher model class type",
      )
      parser.add_argument(
          "--kd_temp",
          type=float,
          default=1.0,
          help="KD temperature value",
      )
      parser.add_argument(
          "--kd_loss_fn",
          type=str,
          choices=["kl", "mse"],
          default="mse",
          help="KD loss function",
      )
      parser.add_argument(
          "--kd_dist_w",
          type=float,
          default=0.1,
          help="KD weight on loss",
      )
      parser.add_argument(
          "--kd_student_w",
          type=float,
          default=1.0,
          help="KD student weight on loss",
      )
  
file_path: nlp-architect/nlp_architect/nn/torch/distillation.py
imports: import argparse
  import logging
  import torch
  import torch.nn
  import torch.nn.functional
  from nlp_architect.models import TrainableModel
label_desc: Use image node_id 3 for calling the TeacherStudentDistill obj's underlying member method code with example usage: obj.add_args(parser) without return types