class_docstr: Basic implementation of a general Knowledge Distillation framework
  
  :param teacher_model (torch.nn.Module): Teacher model
  :param student_model (torch.nn.Module): Student model
  :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_student (torch.optim.*): Optimizer used for training student
  :param loss_fn (torch.nn.Module): Loss Function used for 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
docstr: Custom loss function to calculate the KD loss for various implementations
  
  :param y_pred_student (Tensor): Predicted outputs from the student network
  :param y_pred_teacher (Tensor): Predicted outputs from the teacher network
  :param y_true (Tensor): True labels
docstr_tok: ["Custom","loss","function","to","calculate","the","KD","loss","for","various","implementations",":","param","y_pred_student","(","Tensor",")",":","Predicted","outputs","from","the","student","network",":","param","y_pred_teacher","(","Tensor",")",":","Predicted","outputs","from","the","teacher","network",":","param","y_true","(","Tensor",")",":","True","labels"]
code: def calculate_kd_loss(self, y_pred_student, y_pred_teacher, y_true):
      """
      Custom loss function to calculate the KD loss for various implementations
  
      :param y_pred_student (Tensor): Predicted outputs from the student network
      :param y_pred_teacher (Tensor): Predicted outputs from the teacher network
      :param y_true (Tensor): True labels
      """
  
      raise NotImplementedError
  
file_path: KD_Lib/KD_Lib/KD/common/base_class.py
imports: import os
  from copy import deepcopy
  import matplotlib.pyplot
  import torch
  import torch.nn
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 5 for calling the BaseClass obj's underlying member method code with example usage: obj.calculate_kd_loss(y_pred_student, y_pred_teacher, y_true) without return types