text: import torch
  import torch.nn as nn
  import torch.nn.parallel
  import torch.backends.cudnn as cudnn
  import torch.nn.functional as F
  import torch.optim as optim
  import torch.utils.data as data
  import torchvision.transforms as transforms
  import torchvision.datasets as datasets
  from torch.autograd import Variable
  
  
  
  def create_model(grad=True):
  
  
      if not grad:
          for param in model.parameters():
              param.detach_()
      return model