Skip to content

Commit

Permalink
Added type conversion and const.
Browse files Browse the repository at this point in the history
  • Loading branch information
glumb committed Nov 16, 2015
1 parent df4baad commit 6c70089
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/fann_test_train.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ TEST_F(FannTestTrain, TrainSimpleIncrementalXor) {
neural_net net(LAYER, 3, 2, 3, 1);

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((fann_type*) (const fann_type[]) {0.0, 0.0}, (fann_type*) (const fann_type[]) {0.0});
net.train((fann_type*) (const fann_type[]) {1.0, 0.0}, (fann_type*) (const fann_type[]) {1.0});
net.train((fann_type*) (const fann_type[]) {0.0, 1.0}, (fann_type*) (const fann_type[]) {1.0});
net.train((fann_type*) (const fann_type[]) {1.0, 1.0}, (fann_type*) (const fann_type[]) {0.0});
}

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

0 comments on commit 6c70089

Please sign in to comment.