Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

add cpp example inception to nightly test #13534

Merged
merged 4 commits into from
Dec 8, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp-package/example/mlp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void MLP() {
grad_req_type, aux_states);

std::cout << "Training" << std::endl;
int max_iters = 20000;
int max_iters = 10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are reducing max_iters to 10, but you did not change line 152 which has an if (iter % 100 == 0)
If you want to run for 10 epochs only I think you can remove the if condition on line 152.
I also suggest to rename iter to epochNum for readability.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed comments and turns out it's iterating on a synthetic patterned data of size 128, it will take around 15000 epochs to get 90% acc. Renamed the variables and added comment

mx_float learning_rate = 0.0001;
for (int iter = 0; iter < max_iters; ++iter) {
exe->Forward(true);
Expand Down
3 changes: 3 additions & 0 deletions cpp-package/tests/ci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down