Skip to content

Commit

Permalink
Merge branch 'master' of github.com:matthieu637/fann
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu637 committed Sep 19, 2016
2 parents 4fbe9c8 + d71d547 commit 97882a1
Show file tree
Hide file tree
Showing 527 changed files with 79,647 additions and 77,578 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ install_manifest.txt
/bin/scaling_testd.exe
/bin/scaling_traind.exe
/bin/steepness_traind.exe
/bin/xor_cpp_sampled.exe
/bin/xor_cpp_sampled.exe
*.sln
*.suo
*.filters
*.vcxproj
6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

400 changes: 400 additions & 0 deletions .idea/fann.iml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/runConfigurations/Tests.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
sudo: false

language: cpp

compiler:
- gcc

addons:
apt:
sources:
- llvm-toolchain-precise
- ubuntu-toolchain-r-test
packages:
- clang-3.7
- g++-5
- gcc-5
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi

before_script:
- cmake .

script:
- make
- ./tests/fann_tests

132 changes: 112 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,55 +1,147 @@
PROJECT (FANN)
#SET(CMAKE_VERBOSE_MAKEFILE ON)
cmake_minimum_required(VERSION 2.8)
IF(BIICODE)
# Initializes block variables
INIT_BIICODE_BLOCK()

# Output folder for binaries
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin/fann/examples)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/../bin/fann/examples)

SET(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake/Modules
)
# Copy datasets for examples if exists
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/datasets)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/datasets DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../bin/)
ENDIF()

SET(VERSION 2.2.0)
# Include recipes block for CPP11 activation
INCLUDE(biicode/cmake/tools)

INCLUDE(DefineInstallationPaths)
# Are examples present?
LIST(FIND BII_BLOCK_EXES examples_parallel_train examples_present)
SET(examples_present (NOT ${examples_present} EQUAL "-1")) # Depending on examples
IF(${examples_present} AND NOT WIN32 AND NOT APPLE) # Linux doesn't have GetTickCount
LIST(REMOVE_ITEM BII_BLOCK_EXES examples_parallel_train)
ENDIF()

ADD_BIICODE_TARGETS()

IF(${examples_present})
# This example needs CPP11
ACTIVATE_CPP11(lasote_fann_examples_xor_sample)
ENDIF()

TARGET_COMPILE_OPTIONS(${BII_BLOCK_TARGET} INTERFACE -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1)

IF(MSVC)
TARGET_COMPILE_OPTIONS(${BII_LIB_TARGET} PUBLIC -DFANN_DLL_EXPORTS)
ELSE()
IF(${examples_present})
TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE gomp)
ENDIF()
ENDIF()
ELSE()
cmake_minimum_required (VERSION 2.8)

if (NOT DEFINED CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")
endif ()

project (FANN)

list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)

set (FANN_VERSION_MAJOR 2)
set (FANN_VERSION_MINOR 2)
set (FANN_VERSION_PATCH 0)
set (FANN_VERSION_STRING ${FANN_VERSION_MAJOR}.${FANN_VERSION_MINOR}.${FANN_VERSION_PATCH})

option(BUILD_SHARED_LIBS "build shared/static libs" ON)

INCLUDE(DefineInstallationPaths)

configure_file( ${CMAKE_SOURCE_DIR}/cmake/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/include/config.h )
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/src/include/)

configure_file( ${CMAKE_SOURCE_DIR}/cmake/fann.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/fann.pc @ONLY )
configure_file (cmake/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/include/config.h)
include_directories (${CMAKE_CURRENT_BINARY_DIR}/src/include/)

SET(PKGCONFIG_INSTALL_DIR /lib/pkgconfig)
configure_file (cmake/fann.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/fann.pc @ONLY)

########### install files ###############

INSTALL_FILES( ${PKGCONFIG_INSTALL_DIR} FILES fann.pc )
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/fann.pc DESTINATION ${PKGCONFIG_INSTALL_DIR})

ADD_SUBDIRECTORY( src )

################# cpack ################

SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Fast Artificial Neural Network Library (FANN)")
SET(CPACK_PACKAGE_VENDOR "Steffen Nissen")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "2")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
SET(CPACK_PACKAGE_VERSION_MAJOR "${FANN_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${FANN_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${FANN_VERSION_PATCH}")
SET(CPACK_GENERATOR "TGZ;ZIP")
SET(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Steffen Nissen")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
IF(WIN32 AND NOT UNIX)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
# SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
# SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
# SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
# SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} My Famous Project")
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\leenissen.dk/fann/")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\leenissen.dk/fann/")
SET(CPACK_NSIS_CONTACT "[email protected]")
SET(CPACK_NSIS_CONTACT "[email protected]")
SET(CPACK_NSIS_MODIFY_PATH ON)
ELSE(WIN32 AND NOT UNIX)
# SET(CPACK_STRIP_FILES "bin/MyExecutable")
# SET(CPACK_SOURCE_STRIP_FILES "")
ENDIF(WIN32 AND NOT UNIX)
#SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")
INCLUDE(CPack)

################# config ################

set (FANN_USE_FILE ${CMAKE_CONFIG_DIR}/fann-use.cmake)
set (FANN_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
set (FANN_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
set (FANN_INCLUDE_DIRS ${FANN_INCLUDE_DIR})
set (FANN_LIBRARY_DIRS ${CMAKE_INSTALL_PREFIX}/lib)
set (FANN_LIBRARY fann)
set (FANN_LIBRARIES ${FANN_LIBRARY})
if (UNIX)
list (APPEND FANN_LIBRARIES m)
endif ()

if (CMAKE_VERSION VERSION_LESS 2.8.8)
configure_file (cmake/fann-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/fann-config.cmake @ONLY)
else ()

include (CMakePackageConfigHelpers)

configure_package_config_file (
cmake/fann-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/fann-config.cmake
INSTALL_DESTINATION FANN_CMAKE_CONFIG_DIR
PATH_VARS
FANN_USE_FILE
FANN_ROOT_DIR
FANN_INCLUDE_DIR
FANN_INCLUDE_DIRS
FANN_LIBRARY_DIRS
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)

endif ()

install (FILES
${CMAKE_CURRENT_BINARY_DIR}/fann-config.cmake
cmake/fann-use.cmake
DESTINATION ${CMAKE_CONFIG_DIR}
)

################# compile tests ################

ADD_SUBDIRECTORY( lib/googletest )
ADD_SUBDIRECTORY( tests )

ENDIF()
File renamed without changes.
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Fast Artificial Neural Network Library
## FANN

**Fast Artificial Neural Network (FANN) Library** is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks.

Cross-platform execution in both fixed and floating point are supported. It includes a framework for easy handling of training data sets. It is easy to use, versatile, well documented, and fast.

Bindings to more than 15 programming languages are available.

An easy to read introduction article and a reference manual accompanies the library with examples and recommendations on how to use the library.

Several graphical user interfaces are also available for the library.

## FANN Features

* Multilayer Artificial Neural Network Library in C
* Backpropagation training (RPROP, Quickprop, Batch, Incremental)
* Evolving topology training which dynamically builds and trains the ANN (Cascade2)
* Easy to use (create, train and run an ANN with just three function calls)
* Fast (up to 150 times faster execution than other libraries)
* Versatile (possible to adjust many parameters and features on-the-fly)
* Well documented (An easy to read introduction article, a thorough reference manual, and a 50+ page university report describing the implementation considerations etc.)
* Cross-platform (configure script for linux and unix, dll files for windows, project files for MSVC++ and Borland compilers are also reported to work)
* Several different activation functions implemented (including stepwise linear functions for that extra bit of speed)
* Easy to save and load entire ANNs
* Several easy to use examples
* Can use both floating point and fixed point numbers (actually both float, double and int are available)
* Cache optimized (for that extra bit of speed)
* Open source, but can still be used in commercial applications (licenced under LGPL)
* Framework for easy handling of training data sets
* Graphical Interfaces
* Language Bindings to a large number of different programming languages
* Widely used (approximately 100 downloads a day)

## To Install

### On Linux

#### From Source

First you'll want to clone the repository:

`git clone https://github.com/libfann/fann.git`

Once that's finished, navigate to the Root directory. In this case it would be ./fann:

`cd ./fann`

Then run CMake

`cmake .`

After that, you'll need to use elevated priviledges to install the library:

`sudo make install`

That's it! If everything went right, you should see a lot of text, and FANN should be installed!

## To Learn More

To get started with FANN, go to the [FANN help site](http://leenissen.dk/fann/wp/help/), which will include links to all the available resources.

For more information about FANN, please refer to the [FANN website](http://leenissen.dk/fann/wp/)
37 changes: 0 additions & 37 deletions README.txt

This file was deleted.

Loading

0 comments on commit 97882a1

Please sign in to comment.