class_docstr: Implementation of "Deep Mutual Learning" https://arxiv.org/abs/1706.00384
  
  :param student_cohort (list/tuple): Collection of student models
  :param train_loader (torch.utils.data.DataLoader): Dataloader for training
  :param val_loader (torch.utils.data.DataLoader): Dataloader for validation/testing
  :param student_optimizers (list/tuple): Collection of Pytorch optimizers for training students
  :param loss_fn (torch.nn.Module): Loss Function used for distillation
  :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","``","Deep","Mutual","Learning","''","https",":","\/\/arxiv.org\/abs\/1706.00384",":","param","student_cohort","(","list\/tuple",")",":","Collection","of","student","models",":","param","train_loader","(","torch.utils.data.DataLoader",")",":","Dataloader","for","training",":","param","val_loader","(","torch.utils.data.DataLoader",")",":","Dataloader","for","validation\/testing",":","param","student_optimizers","(","list\/tuple",")",":","Collection","of","Pytorch","optimizers","for","training","students",":","param","loss_fn","(","torch.nn.Module",")",":","Loss","Function","used","for","distillation",":","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: Evaluate the given model's accuaracy over val set.
  For internal use only.
  
  :param model (nn.Module): Model to be used for evaluation
  :param verbose (bool): Display Accuracy
docstr_tok: ["Evaluate","the","given","model","'s","accuaracy","over","val","set",".","For","internal","use","only",".",":","param","model","(","nn.Module",")",":","Model","to","be","used","for","evaluation",":","param","verbose","(","bool",")",":","Display","Accuracy"]
code: def _evaluate_model(self, model, verbose=True):
      """
      Evaluate the given model's accuaracy over val set.
      For internal use only.
  
      :param model (nn.Module): Model to be used for evaluation
      :param verbose (bool): Display Accuracy
      """
      model.eval()
      length_of_dataset = len(self.val_loader.dataset)
      correct = 0
      outputs = []
  
      with torch.no_grad():
          for data, target in self.val_loader:
              data = data.to(self.device)
              target = target.to(self.device)
              output = model(data)
  
              if isinstance(output, tuple):
                  output = output[0]
              outputs.append(output)
  
              pred = output.argmax(dim=1, keepdim=True)
              correct += pred.eq(target.view_as(pred)).sum().item()
  
      if verbose:
          print(f"Accuracy: {correct/length_of_dataset}")
  
      epoch_val_acc = correct / length_of_dataset
      return outputs, epoch_val_acc
  
file_path: KD_Lib/KD_Lib/KD/vision/DML/dml.py
imports: import os
  from copy import deepcopy
  import matplotlib.pyplot
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 3 for calling the DML obj's underlying member method code with example usage: obj._evaluate_model(model, verbose) and returns: outputs,  epoch_val_acc