Skip to content

Commit 64b4a58

Browse files
authored
Added output to simple_train.php
Added output to simple_train.php so that the page acknowledges that the training was completed and that the network was saved. Additionally a link to the test script was added.
1 parent 5cb6375 commit 64b4a58

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/simple_train.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
fann_set_activation_function_output($ann, FANN_SIGMOID_SYMMETRIC);
1616

1717
$filename = dirname(__FILE__) . "/xor.data";
18-
if (fann_train_on_file($ann, $filename, $max_epochs, $epochs_between_reports, $desired_error))
19-
fann_save($ann, dirname(__FILE__) . "/xor_float.net");
18+
if (fann_train_on_file($ann, $filename, $max_epochs, $epochs_between_reports, $desired_error)) {
19+
print('xor trained.<br>' . PHP_EOL);
20+
21+
if (fann_save($ann, dirname(__FILE__) . "/xor_float.net"))
22+
print('xor_float.net saved.<br><a href="simple_test.php">Test</a>' . PHP_EOL);
2023

2124
fann_destroy($ann);
2225
}

0 commit comments

Comments
 (0)