def set_model_mode(self, mode='train', names=None):
    names = self.get_model_names(names)
    for name in names:
        if (mode == 'train'):
            self._models[name].train()
        else:
            self._models[name].eval()
def set_model_mode(self, mode='train', names=None):
    names = self.get_model_names(names)
    for name in names:
        if (mode == 'train'):
            self._models[name].train()
        else:
            self._models[name].eval()