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"]
code: def __init__(
      self,
      student_cohort,
      train_loader,
      val_loader,
      student_optimizers,
      loss_fn=nn.MSELoss(),
      device="cpu",
      log=False,
      logdir="./Experiments",
  ):
      self.student_cohort = student_cohort
      self.train_loader = train_loader
      self.val_loader = val_loader
      self.student_optimizers = student_optimizers
      self.loss_fn = loss_fn
      self.log = log
      self.logdir = logdir
  
      if self.log:
          self.writer = SummaryWriter(logdir)
  
      try:
          torch.Tensor(0).to(device)
          self.device = device
      except:
          print(
              "Either an invalid device or CUDA is not available. Defaulting to CPU."
          )
          self.device = "cpu"
  
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 1 to create a new DML object  with example: obj = DML(student_cohort, train_loader, val_loader, student_optimizers, loss_fn, device, log, logdir)