You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/01/10 15:43:53 UTC

[GitHub] TaoLv commented on a change in pull request #13828: Add error checking for cpp examples.

TaoLv commented on a change in pull request #13828: Add error checking for cpp examples.
URL: https://github.com/apache/incubator-mxnet/pull/13828#discussion_r246810060
 
 

 ##########
 File path: cpp-package/example/alexnet.cpp
 ##########
 @@ -244,10 +244,14 @@ int main(int argc, char const *argv[]) {
                               };
 
   auto train_iter =  MXDataIter("MNISTIter");
-  setDataIter(&train_iter, "Train", data_files, batch_size);
+  if (!setDataIter(&train_iter, "Train", data_files, batch_size)) {
+    return 1;
 
 Review comment:
   Can we have some descriptive error messages?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services