class_docstr: Implementation of Knowledge distillation from the paper "Distilling Task-Specific
  Knowledge from BERT into Simple Neural Networks" https://arxiv.org/pdf/1903.12136.pdf
  
  :param student_model (torch.nn.Module): Student model
  :param distill_train_loader (torch.utils.data.DataLoader): Student Training Dataloader for distillation
  :param distill_val_loader (torch.utils.data.DataLoader): Student Testing/validation Dataloader
  :param train_df (pandas.DataFrame): Dataframe for training the teacher model
  :param val_df (pandas.DataFrame): Dataframe for validating the teacher model
  :param loss_fn (torch.nn.module): Loss function
  :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","Knowledge","distillation","from","the","paper","``","Distilling","Task-Specific","Knowledge","from","BERT","into","Simple","Neural","Networks","''","https",":","\/\/arxiv.org\/pdf\/1903.12136.pdf",":","param","student_model","(","torch.nn.Module",")",":","Student","model",":","param","distill_train_loader","(","torch.utils.data.DataLoader",")",":","Student","Training","Dataloader","for","distillation",":","param","distill_val_loader","(","torch.utils.data.DataLoader",")",":","Student","Testing\/validation","Dataloader",":","param","train_df","(","pandas.DataFrame",")",":","Dataframe","for","training","the","teacher","model",":","param","val_df","(","pandas.DataFrame",")",":","Dataframe","for","validating","the","teacher","model",":","param","loss_fn","(","torch.nn.module",")",":","Loss","function",":","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: Function used for evaluating student
  
  :param verbose (bool): True if the accuracy needs to be printed else False
docstr_tok: ["Function","used","for","evaluating","student",":","param","verbose","(","bool",")",":","True","if","the","accuracy","needs","to","be","printed","else","False"]
code: def evaluate_student(self, verbose=True):
      """
      Function used for evaluating student
  
      :param verbose (bool): True if the accuracy needs to be printed else False
      """
  
      self.student_model.eval()
      self.student_model.to(self.device)
      length_of_dataset = len(self.val_loader.dataset)
      correct = 0
      outputs = []
  
      with torch.no_grad():
          for data, data_len, target in self.val_loader:
              data = data.to(self.device)
              data_len = data_len.to(self.device)
              target = target.to(self.device)
              output = self.student_model(data, data_len).squeeze(1)
              outputs.append(output)
  
              pred = output.argmax(dim=1, keepdim=True)
              correct += pred.eq(target.view_as(pred)).sum().item()
  
      accuracy = correct / length_of_dataset
      if verbose:
          print("-" * 80)
          print(f"Accuracy: {accuracy}")
  
      return outputs, accuracy
  
file_path: KD_Lib/KD_Lib/KD/text/BERT2LSTM/bert2lstm.py
imports: import random
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from transformers import AdamW, BertForSequenceClassification, BertTokenizer
  from KD_Lib.KD.common import BaseClass
  from KD_Lib.KD.text.utils import get_bert_dataloader
label_desc: Use image node_id 7 for calling the BERT2LSTM obj's underlying member method code with example usage: obj.evaluate_student(verbose) and returns: outputs,  accuracy