def model_backward_and_update(self, loss, names=None):
    self.model_zero_grad(names)
    self.model_backward(loss)
    self.model_update(names)
    if self.use_amp:
        self.scaler.update()
def model_backward_and_update(self, loss, names=None):
    self.model_zero_grad(names)
    self.model_backward(loss)
    self.model_update(names)
    if self.use_amp:
        self.scaler.update()