class_docstr: Implementation of assisted Knowledge distillation from the paper "Improved Knowledge
  Distillation via Teacher Assistant" https://arxiv.org/pdf/1902.03393.pdf
  
  :param teacher_model (torch.nn.Module): Teacher model
  :param assistant_models (list or tuple): Assistant models
  :param student_model (torch.nn.Module): Student model
  :param assistant_train_order (list or tuple or array): Order of training for that assistant
  :param train_loader (torch.utils.data.DataLoader): Dataloader for training
  :param val_loader (torch.utils.data.DataLoader): Dataloader for validation/testing
  :param optimizer_teacher (torch.optim.*): Optimizer used for training teacher
  :param optimizer_assistants (torch.optim.*): Optimizer used for training assistants
  :param optimizer_student (torch.optim.*): Optimizer used for training student
  :param loss_fn (torch.nn.Module):  Calculates loss during distillation
  :param temp (float): Temperature parameter for distillation
  :param distil_weight (float): Weight paramter for distillation loss
  :param device (str): Device used for training; 'cpu' for cpu and 'cuda' for gpu
  :param log (bool): True if logging required
  :param logdir (str): Directory for storing logs
class_docstr_tok: ["Implementation","of","assisted","Knowledge","distillation","from","the","paper","``","Improved","Knowledge","Distillation","via","Teacher","Assistant","''","https",":","\/\/arxiv.org\/pdf\/1902.03393.pdf",":","param","teacher_model","(","torch.nn.Module",")",":","Teacher","model",":","param","assistant_models","(","list","or","tuple",")",":","Assistant","models",":","param","student_model","(","torch.nn.Module",")",":","Student","model",":","param","assistant_train_order","(","list","or","tuple","or","array",")",":","Order","of","training","for","that","assistant",":","param","train_loader","(","torch.utils.data.DataLoader",")",":","Dataloader","for","training",":","param","val_loader","(","torch.utils.data.DataLoader",")",":","Dataloader","for","validation\/testing",":","param","optimizer_teacher","(","torch.optim",".","*",")",":","Optimizer","used","for","training","teacher",":","param","optimizer_assistants","(","torch.optim",".","*",")",":","Optimizer","used","for","training","assistants",":","param","optimizer_student","(","torch.optim",".","*",")",":","Optimizer","used","for","training","student",":","param","loss_fn","(","torch.nn.Module",")",":","Calculates","loss","during","distillation",":","param","temp","(","float",")",":","Temperature","parameter","for","distillation",":","param","distil_weight","(","float",")",":","Weight","paramter","for","distillation","loss",":","param","device","(","str",")",":","Device","used","for","training",";","'cpu","'","for","cpu","and","'cuda","'","for","gpu",":","param","log","(","bool",")",":","True","if","logging","required",":","param","logdir","(","str",")",":","Directory","for","storing","logs"]
code: def __init__(
      self,
      teacher_model,
      assistant_models,
      student_model,
      assistant_train_order,
      train_loader,
      val_loader,
      optimizer_teacher,
      optimizer_assistants,
      optimizer_student,
      loss_fn=nn.MSELoss(),
      temp=20.0,
      distil_weight=0.4,
      device="cpu",
      log=False,
      logdir="./Experiments",
  ):
      super(TAKD, self).__init__(
          teacher_model,
          student_model,
          train_loader,
          val_loader,
          optimizer_teacher,
          optimizer_student,
          loss_fn,
          temp,
          distil_weight,
          device,
          log,
          logdir,
      )
      self.assistant_models = assistant_models
      self.optimizer_assistants = optimizer_assistants
      self.assistant_train_order = assistant_train_order
      self.log_softmax = nn.LogSoftmax(dim=1).to(self.device)
  
file_path: KD_Lib/KD_Lib/KD/vision/TAKD/takd.py
imports: from copy import deepcopy
  import matplotlib.pyplot
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from KD_Lib.KD.common import BaseClass
label_desc: Use image node_id 1 to create a new TAKD object from inherited base classes: BaseClass with example: obj = TAKD(teacher_model, assistant_models, student_model, assistant_train_order, train_loader, val_loader, optimizer_teacher, optimizer_assistants, optimizer_student, loss_fn, temp, distil_weight, device, log, logdir)