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

[MXNET-1323] CPP GPU test running too long #14149

Merged
merged 1 commit into from
Feb 14, 2019
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
7 changes: 3 additions & 4 deletions cpp-package/example/mlp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

10 changes: 5 additions & 5 deletions cpp-package/tests/ci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down