This is an automated email from the ASF dual-hosted git repository. lanking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push: new 518cd40 Updated the MLP test to accept the number of epochs. Reduced the epochs in ci_test.sh to shorten the CI build time (#14149) 518cd40 is described below commit 518cd408a2c1d82dd5342268dfc80c41e427b765 Author: Amol Lele <19983848+lelea...@users.noreply.github.com> AuthorDate: Thu Feb 14 09:55:09 2019 -0800 Updated the MLP test to accept the number of epochs. Reduced the epochs in ci_test.sh to shorten the CI build time (#14149) --- cpp-package/example/mlp.cpp | 7 +++---- cpp-package/tests/ci_test.sh | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/cpp-package/example/mlp.cpp b/cpp-package/example/mlp.cpp index cc16f53..c3760fd 100644 --- a/cpp-package/example/mlp.cpp +++ b/cpp-package/example/mlp.cpp @@ -49,7 +49,7 @@ void OutputAccuracy(mx_float* pred, mx_float* target) { std::cout << "Accuracy: " << right / 128.0 << std::endl; } -void MLP() { +void MLP(int max_epoch) { auto sym_x = Symbol::Variable("X"); auto sym_label = Symbol::Variable("label"); @@ -144,7 +144,6 @@ void MLP() { grad_req_type, aux_states); std::cout << "Training" << std::endl; - int max_epoch = 15000; mx_float learning_rate = 0.0001; for (int epoch_num = 0; epoch_num < max_epoch; ++epoch_num) { exe->Forward(true); @@ -173,8 +172,8 @@ void MLP() { } int main(int argc, char** argv) { - MLP(); + int max_epoch = argc > 1 ? strtol(argv[1], NULL, 10) : 15000; + MLP(max_epoch); MXNotifyShutdown(); return 0; } - diff --git a/cpp-package/tests/ci_test.sh b/cpp-package/tests/ci_test.sh index 7abdef4..18fabea 100755 --- a/cpp-package/tests/ci_test.sh +++ b/cpp-package/tests/ci_test.sh @@ -25,22 +25,22 @@ ls -l ../../lib/ ./get_data.sh cp ../../build/cpp-package/example/lenet . -./lenet 10 +./lenet 1 cp ../../build/cpp-package/example/alexnet . ./alexnet 1 cp ../../build/cpp-package/example/lenet_with_mxdataiter . -./lenet_with_mxdataiter 5 +./lenet_with_mxdataiter 1 cp ../../build/cpp-package/example/resnet . -./resnet 5 +./resnet 1 cp ../../build/cpp-package/example/inception_bn . -./inception_bn 5 +./inception_bn 1 cp ../../build/cpp-package/example/mlp . -./mlp +./mlp 150 cp ../../build/cpp-package/example/mlp_cpu . ./mlp_cpu