HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/FograCT1/simple_test.php
<?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" . PHP_EOL);

$ann = fann_create_from_file($train_file);
if ($ann) {
	$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);
} else {
	die("Invalid file format" . PHP_EOL);
}