code: def __init__(self, model, optimizer, device, data_provider, n_epochs):
      self.model = model
      self.optimizer = optimizer
      self.device = device
      self.train_loader = data_provider.train
      self.valid_loader = data_provider.valid
      self.test_loader = data_provider.test
      self.n_epochs = n_epochs
      self.criterion = nn.CrossEntropyLoss()
  
file_path: nni/examples/nas/legacy/oneshot/proxylessnas/retrain.py
imports: import time
  import math
  from datetime import timedelta
  import torch
  from torch import nn
  from nni.nas.pytorch.utils import AverageMeter
label_desc: Use image node_id 1 to create a new Retrain object  with example: obj = Retrain(model, optimizer, device, data_provider, n_epochs)