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 all 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
10 changes: 5 additions & 5 deletions cpp-package/example/mlp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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