Skip to content

Commit

Permalink
fix more travis build errors and get rid of clang build (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
steffennissen committed Nov 29, 2015
1 parent 88c5623 commit 78d9f6c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ language: cpp

compiler:
- gcc
- clang

addons:
apt:
Expand Down
15 changes: 11 additions & 4 deletions tests/fann_test_train.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ TEST_F(FannTestTrain, TrainOnDateSimpleXor) {
TEST_F(FannTestTrain, TrainSimpleIncrementalXor) {
neural_net net(LAYER, 3, 2, 3, 1);

fann_type input1[] = {0.0, 0.0};
fann_type input2[] = {1.0, 0.0};
fann_type input3[] = {0.0, 1.0};
fann_type input4[] = {1.0, 1.0};
fann_type output0[] = {0.0};
fann_type output1[] = {1.0};

for(int i = 0; i < 100000; i++) {
net.train((fann_type[]) {0.0, 0.0}, (fann_type[]) {0.0});
net.train((fann_type[]) {1.0, 0.0}, (fann_type[]) {1.0});
net.train((fann_type[]) {0.0, 1.0}, (fann_type[]) {1.0});
net.train((fann_type[]) {1.0, 1.0}, (fann_type[]) {0.0});
net.train(input1, output0);
net.train(input2, output1);
net.train(input3, output1);
net.train(input4, output0);
}

EXPECT_LT(net.get_MSE(), 0.01);
Expand Down

0 comments on commit 78d9f6c

Please sign in to comment.