def model_zero_grad(self, names=None):
    names = self.get_model_names(names)
    for name in names:
        if (self._optims[name] is not None):
            self._optims[name].zero_grad()
def model_zero_grad(self, names=None):
    names = self.get_model_names(names)
    for name in names:
        if (self._optims[name] is not None):
            self._optims[name].zero_grad()