Difference between revisions of "Visual network topoloy"

From Artificial Neural Network for PHP
Line 2: Line 2:
   
 
<source lang="php">
 
<source lang="php">
require_once 'ANN/ANN_Network.php';
+
require_once 'ANN/ANN_Loader.php';
   
 
try
 
try

Revision as of 18:49, 16 December 2008

PNG image of network topology

require_once 'ANN/ANN_Loader.php';

try
{
  $network = ANN_Network::loadFromFile('xor.dat');
}
catch(Exception $e)
{
  print 'Network not found';
  exit;
}

$image = new ANN_NetworkGraph($network);

$image->saveToFile('network.png');

Output

Image of network toplogy