code: def createOptimizer(self, model):
      
      return torch.optim.SGD(model.parameters(),
                             lr=self.lr,
                             momentum=self.momentum,
                             weight_decay=self.weight_decay)
docs: Create a new instance of the optimizer