Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php $train_file = (dirname(__FILE__) . "/xor_float.net"); if (!is_file($train_file)) die("The file xor_float.net has not been created! Please run simple_train.php to generate it"); $ann = fann_create_from_file($train_file); if (!$ann) die("ANN could not be created"); $input = array(-1, 1); $calc_out = fann_run($ann, $input); printf("xor test (%f,%f) -> %f\n", $input[0], $input[1], $calc_out[0]); fann_destroy($ann); ?>
Copy Clear