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 2018/12/08 03:57:56 UTC

[GitHub] nswamy closed pull request #13534: add cpp example inception to nightly test

nswamy closed pull request #13534: add cpp example inception to nightly test
URL: https://github.com/apache/incubator-mxnet/pull/13534
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/cpp-package/example/mlp.cpp b/cpp-package/example/mlp.cpp
index 595d75c67c0..cc16f53cf20 100644
--- a/cpp-package/example/mlp.cpp
+++ b/cpp-package/example/mlp.cpp
@@ -144,13 +144,13 @@ void MLP() {
                                grad_req_type, aux_states);
 
   std::cout << "Training" << std::endl;
-  int max_iters = 20000;
+  int max_epoch = 15000;
   mx_float learning_rate = 0.0001;
-  for (int iter = 0; iter < max_iters; ++iter) {
+  for (int epoch_num = 0; epoch_num < max_epoch; ++epoch_num) {
     exe->Forward(true);
-
-    if (iter % 100 == 0) {
-      std::cout << "epoch " << iter << std::endl;
+    // print accuracy every 100 epoch
+    if (epoch_num % 100 == 0) {
+      std::cout << "epoch " << epoch_num << std::endl;
       std::vector<NDArray>& out = exe->outputs;
       float* cptr = new float[128 * 10];
       out[0].SyncCopyToCPU(cptr, 128 * 10);
diff --git a/cpp-package/tests/ci_test.sh b/cpp-package/tests/ci_test.sh
index 7674e2d988b..4a17d8d34c1 100755
--- a/cpp-package/tests/ci_test.sh
+++ b/cpp-package/tests/ci_test.sh
@@ -36,6 +36,9 @@ cp ../../build/cpp-package/example/lenet_with_mxdataiter .
 cp ../../build/cpp-package/example/resnet .
 ./resnet 5
 
+cp ../../build/cpp-package/example/inception_bn .
+./inception_bn 5
+
 cp ../../build/cpp-package/example/mlp .
 ./mlp
 


 

----------------------------------------------------------------
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