소스 검색

preprocessing fn argument check

John Welsh 7 년 전
부모
커밋
54aac518c8
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      examples/classify_image/classify_image.cu

+ 4 - 1
examples/classify_image/classify_image.cu

@@ -89,7 +89,10 @@ int main(int argc, char *argv[])
   else if (preprocessingFn == "inception")
     preprocessInception(inputDataHost, inputDims);
   else
-    cout << "Unsupported preprocessing function.  Results may not be correct.\n" << endl;
+  {
+    cout << "Invalid preprocessing function argument, must be vgg or inception. \n" << endl;
+    return 1;
+  }
 
   /* transfer to device */
   float *inputDataDevice, *outputDataDevice;