(self, task_name)
Save the model. Directory is determined by the task name and model class name
Save the model. Directory is determined by the task name and model class name
Save the model . Directory is determined by the task name and model class name
def save(self, task_name):
        """
        Save the model. Directory is determined by the task name and model class name
        """
        model_dir = gen_model_dir(task_name, self.__class__)
        checkpoint_path = os.path.join(model_dir, CHECKPOINT_FILE.format(int(self.iterations)))
        torch.save(self.state_dict(), checkpoint_path)
        logger.info('-------------- Saved checkpoint {} --------------'.format(int(self.iterations)))
def save ( self , task_name ) : model_dir = gen_model_dir ( task_name , self . __class__ ) checkpoint_path = os . path . join ( model_dir , CHECKPOINT_FILE . format ( int ( self . iterations ) ) ) torch . save ( self . state_dict ( ) , checkpoint_path ) logger . info ( '-------------- Saved checkpoint {} --------------' . format ( int ( self . iterations ) ) )