serializatioin / deserialization and tests

This commit is contained in:
2016-04-06 15:54:47 +02:00
parent adb6708b39
commit 17cbf5effe
28 changed files with 437 additions and 280 deletions

View File

@@ -26,18 +26,12 @@ OPTION(USE_SSE2 "If SSE 2 instruction set should be used." ON)
OPTION(USE_AVX "If AVX instruction set should be used." OFF)
OPTION(USE_FMA "If FMA instruction set should be used." OFF)
OPTION(DEBUG "If library should be compiled with DEBUG" OFF)
OPTION(ENABLE_TESTS "enables tests" ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Weffc++ -Wshadow -Wstrict-aliasing -ansi -Woverloaded-virtual -Wdelete-non-virtual-dtor -Wno-unused-function")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14")
if(DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native -O3")
endif(DEBUG)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -mtune=native -O3")
if(USE_AVX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx -DUSE_AVX")
@@ -55,7 +49,7 @@ if(USE_SSE)
endif(USE_SSE)
include_directories(./include/)
include_directories(./lib/SimpleJSON/src/)
include_directories(./lib/SimpleJSON/include)
set (LIBRARY_SOURCES
src/sse_mathfun.cpp
@@ -65,13 +59,13 @@ set (LIBRARY_SOURCES
src/NeuralNetwork/Learning/PerceptronLearning.cpp
src/NeuralNetwork/BasisFunction/Linear.cpp
src/NeuralNetwork/FeedForward/Layer.cpp
src/NeuralNetwork/FeedForward/Network.cpp
src/NeuralNetwork/Recurrent/Network.cpp
src/NeuralNetwork/Neuron.cpp
lib/SimpleJSON/src/JSON.cpp
lib/SimpleJSON/src/JSONValue.cpp
src/NeuralNetwork/Neuron.cpp
src/NeuralNetwork/IMPL.cpp
)
add_library(NeuralNetwork STATIC ${LIBRARY_SOURCES})
@@ -88,7 +82,7 @@ add_subdirectory (tests)
enable_testing()
add_test(activation tests/backpropagation)
add_test(activation tests/activation)
set_property(TEST activation PROPERTY LABELS unit)
add_test(backpropagation tests/backpropagation)