RNN: size
This commit is contained in:
@@ -66,6 +66,10 @@ set (LIBRARY_SOURCES
|
|||||||
|
|
||||||
src/NeuralNetwork/Neuron.cpp
|
src/NeuralNetwork/Neuron.cpp
|
||||||
src/NeuralNetwork/IMPL.cpp
|
src/NeuralNetwork/IMPL.cpp
|
||||||
|
|
||||||
|
src/NeuralNetwork/ConstructiveAlgorithms/CellularEncoding/CellularEncoding.cpp
|
||||||
|
src/NeuralNetwork/ConstructiveAlgorithms/CellularEncoding/Cell.cpp
|
||||||
|
src/NeuralNetwork/ConstructiveAlgorithms/CellularEncoding/GeneticProgramming.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(NeuralNetwork STATIC ${LIBRARY_SOURCES})
|
add_library(NeuralNetwork STATIC ${LIBRARY_SOURCES})
|
||||||
@@ -84,6 +88,8 @@ IF(ENABLE_TESTS)
|
|||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
|
add_executable(activation tests/activation.cpp)
|
||||||
|
target_link_libraries(activation NeuralNetwork gtest gtest_main)
|
||||||
add_test(activation tests/backpropagation)
|
add_test(activation tests/backpropagation)
|
||||||
set_property(TEST activation PROPERTY LABELS unit)
|
set_property(TEST activation PROPERTY LABELS unit)
|
||||||
|
|
||||||
@@ -126,4 +132,10 @@ IF(ENABLE_TESTS)
|
|||||||
add_test(recurrent_perf tests/recurrent_perf)
|
add_test(recurrent_perf tests/recurrent_perf)
|
||||||
set_property(TEST recurrent_perf PROPERTY LABELS perf)
|
set_property(TEST recurrent_perf PROPERTY LABELS perf)
|
||||||
|
|
||||||
|
add_test(celular_code tests/celular_code)
|
||||||
|
set_property(TEST celular_code PROPERTY LABELS unit)
|
||||||
|
|
||||||
|
add_test(genetic_programing tests/genetic_programing)
|
||||||
|
set_property(TEST genetic_programing PROPERTY LABELS unit)
|
||||||
|
|
||||||
ENDIF(ENABLE_TESTS)
|
ENDIF(ENABLE_TESTS)
|
||||||
|
|||||||
@@ -99,6 +99,14 @@ namespace Recurrent {
|
|||||||
|
|
||||||
static std::unique_ptr<Network> deserialize(const SimpleJSON::Type::Object&);
|
static std::unique_ptr<Network> deserialize(const SimpleJSON::Type::Object&);
|
||||||
|
|
||||||
|
std::size_t size() const {
|
||||||
|
return neurons.size();
|
||||||
|
};
|
||||||
|
|
||||||
|
NeuronInterface& operator[](std::size_t index) {
|
||||||
|
return *neurons[index];
|
||||||
|
}
|
||||||
|
|
||||||
typedef SimpleJSON::Factory<Network> Factory;
|
typedef SimpleJSON::Factory<Network> Factory;
|
||||||
protected:
|
protected:
|
||||||
size_t inputSize=0;
|
size_t inputSize=0;
|
||||||
|
|||||||
@@ -4,9 +4,6 @@ project(NeuralNetworkTests CXX)
|
|||||||
|
|
||||||
set(CMAKE_CXX_FLAGS " --std=c++14")
|
set(CMAKE_CXX_FLAGS " --std=c++14")
|
||||||
|
|
||||||
add_executable(activation activation.cpp)
|
|
||||||
target_link_libraries(activation NeuralNetwork gtest gtest_main)
|
|
||||||
|
|
||||||
add_executable(basis basis.cpp)
|
add_executable(basis basis.cpp)
|
||||||
target_link_libraries(basis NeuralNetwork gtest gtest_main)
|
target_link_libraries(basis NeuralNetwork gtest gtest_main)
|
||||||
|
|
||||||
@@ -31,6 +28,11 @@ target_link_libraries(recurrent NeuralNetwork gtest gtest_main)
|
|||||||
add_executable(quickpropagation quickpropagation.cpp)
|
add_executable(quickpropagation quickpropagation.cpp)
|
||||||
target_link_libraries(quickpropagation NeuralNetwork gtest gtest_main)
|
target_link_libraries(quickpropagation NeuralNetwork gtest gtest_main)
|
||||||
|
|
||||||
|
add_executable(celular_code celular_code.cpp)
|
||||||
|
target_link_libraries(celular_code NeuralNetwork gtest gtest_main)
|
||||||
|
|
||||||
|
add_executable(genetic_programing genetic_programing.cpp)
|
||||||
|
target_link_libraries(genetic_programing NeuralNetwork gtest gtest_main)
|
||||||
|
|
||||||
# PERF
|
# PERF
|
||||||
|
|
||||||
@@ -51,3 +53,4 @@ target_link_libraries(quickpropagation_perf NeuralNetwork)
|
|||||||
|
|
||||||
add_executable(propagation_cmp propagation_cmp.cpp)
|
add_executable(propagation_cmp propagation_cmp.cpp)
|
||||||
target_link_libraries(propagation_cmp NeuralNetwork)
|
target_link_libraries(propagation_cmp NeuralNetwork)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user