示例#1
0
 protected override StageResult Init()
 {
     if (TrainOp)
     {
         Contract.Requires(TrainingFile != null && TestFile == null);
         if (!TrainingFile.CheckExistsAndReportError(L))
         {
             return(StageResult.INPUT_ERROR);
         }
         if (!TestFile.CheckExistsAndReportError(L))
         {
             return(StageResult.INPUT_ERROR);
         }
         if (!ModelFileName.IsEmpty() && ModelFile.Exists && !OverwriteOutputFile)
         {
             Error("The model file {0} exists but the overwrite option was not specified.", ModelFile.FullName);
             return(StageResult.INPUT_ERROR);
         }
     }
     return(StageResult.SUCCESS);
 }