def model_update(self, names=None):
    names = self.get_model_names(names)
    for name in names:
        if (self._optims[name] is not None):
            if (not self.use_amp):
                self._optims[name].step()
            else:
                self.scaler.step(self._optims[name])
def model_update(self, names=None):
    names = self.get_model_names(names)
    for name in names:
        if (self._optims[name] is not None):
            if (not self.use_amp):
                self._optims[name].step()
            else:
                self.scaler.step(self._optims[name])