def save(self, file, with_opt=True):
    if rank_distrib():
        return
    file = join_path_file(file, (self.path / self.model_dir), ext='.pth')
    save_model(file, self.model, getattr(self, 'opt', None), with_opt)
def save(self, file, with_opt=True):
    if rank_distrib():
        return
    file = join_path_file(file, (self.path / self.model_dir), ext='.pth')
    save_model(file, self.model, getattr(self, 'opt', None), with_opt)