Fast Artificial Neural Network Library (FANN)
Reference Manual for latest CVS release
Copies of FANN can be obtained from our SourceForge page, located at http://fann.sf.net
You can currently get FANN as source code (fann-*.tar.bz2), Debian packages (fann-*.deb), or RPM’s (fann-*.rpm).
FANN is available under the terms of the GNU Lesser General Public License.
FANN bindings to several other programming languages is also available from: http://fann.sf.net
FANN >= 1.1.0 includes a Microsoft Visual C++ 6.0 project file, which can be used to compile FANN for Windows. To build the library and examples with MSVC++ 6.0.
First, navigate to the MicrosoftVisualC++6.0 directory in the FANN distribution and open the all.dsw workspace. In the Visual Studio menu bar, choose “Build” -> “Batch build...”, select the project configurations that you would like to build (by default, all are selected), and press “rebuild all”
When the build process is complete, the library and examples can be found in the MicrosoftVisualC++6.0\Debug directorie and the examples are automatically copied into the examples where they are supposed to be run. If all of the examples are not copied to the correct location, please compile them separately.
RPMs are a simple way to manage packages, and is used on many common Linux distributions such as Red Hat, Mandrake, and SuSE.
Two separate packages exist; fann, the runtime library, and fann-devel, the development library and header files.
After downloading FANN, simply run (as root) the following command: rpm -ivh $PATH_TO_RPM
DEBs are packages for the Debian Linux distribution. Two separate packages exists libfann1 and libfann1-dev, where libfann1 is the runtime library and libfann1-dev is the development library.
Fann is included in the stable distribution of Debian, so Debian users can simply run (as root) the following command: apt-get install libfann1 libfann1-dev.
After downloading the FANN DEB package, simply run (as root) the following command: dpkg -i $PATH_TO_DEB
Compiling FANN from source code entails the standard GNU autotools technique. First, configure the package as you want it by typing (in the FANN directory), ./configure If you need help choosing the options you would like to use, try ./configure --help
Next, you have to actually compile the library. To do this, simply type make
Finally, to install the library, type make install. Odds are you will have to be root to install, so you may need to su to root before installing. Please remember to log out of the root account immediately after make install finishes.
Some people have experienced problems with compiling the library with some compilers, especially windows compilers which can not use GNU autotools. Please look through the help forum and the mailing list archives for info on how these problems was solved. If you do not find any information here, feel free to ask questions.
Make sure to make and install the fann library first. Make sure that you have swig and python development files installed. Perhaps change the include directory of python. Then run ‘make’ to compile in the python directory.
Copy the generated _fann.so and fann.py files to python modules or into working directory.
After the install, just import fann and all the C functions will be available to your python code.
The easiest way to install FANN-PHP is to use PEAR- if you have a fairly recent version of PHP installed, simply run pear install fann. Note that if there are no stable releases of FANN-PHP, you may have to specify the URI for the package, which can be obtained from http://pecl.php.net/fann.
If you cannot install FANN-PHP using PEAR, you can try following the (obsolete) instructions at http://www.cs.utexas.edu- /users- /UTCS- /online-docs- /php- /pear- /faq.install-pecl.html.
If you use one of these methods, you’ll need to either dl(‘fann.so’) or add it to your php.ini
If you use either of the above methods, you will probably need to be root.
Please only use this method if using the methods outlined in Using PEAR have failed.
If you wish to compile FANN-PHP into PHP itself, you can. First, uncompress the package into the ext subdirectory of your copy of the PHP source code, and rename the directory to ext/fann (from fann-x.x.x).
Next, you must rebuild the configure script- to do so, run ./buildconf from the PHP source directory.
From here on, the procedure is similar to when you built PHP originally- run ./configure with your desired options, plus --with-fann.
Finally, run make and make install. Note that you will probably need to be root for make install to work.
This method may require flex and bison to work- more information can be obtained at http://www.php.net/anoncvs.php
These functions allow you to interact with the FANN library from Delphi.
This extension can be downloaded from the FANN library download section.
This Delphi binding is provided by Mauricio Pereira Maia (email@example.com@firstname.lastname@example.org)
Make sure to install the fann library first.
Put the file fannfloat.dll in your PATH. (By default the bindings will use fannfloat.dll. If you want to use fannfixed.dll or fanndouble.dll you should change the definitions at the beginning of the fann.pas unit. See the comments at the beginning of the fann.pas file for more details). Include fann.pas in your project and in your unit uses clause and have fun! See the XorConsole sample for more details.
TFannNetwork is a Delphi component that encapsulates the Fann Library.
You do not have to install TFannNetwork to use Fann on Delphi, but it will make the library more Delphi friendly.
To install TFannNetwork you should follow all the previous steps and
it might be changed using Package file name field or Into new package page.
(Don’t forget to put Yes when it ask if you want to save the package).