SINGA-204 Support the training of feed-forward neural nets

Add cmake supporting for examples(cifar/alexnet).


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/fce5d813
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/fce5d813
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/fce5d813

Branch: refs/heads/dev
Commit: fce5d8137d50f6ad6579a53137cf832bf2c9509c
Parents: 71eb059
Author: xiezl <[email protected]>
Authored: Mon Jun 27 18:49:10 2016 +0800
Committer: xiezl <[email protected]>
Committed: Mon Jun 27 18:49:10 2016 +0800

----------------------------------------------------------------------
 CMakeLists.txt          | 1 +
 examples/CMakeLists.txt | 8 ++++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/fce5d813/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a5caf3..21d25cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,3 +43,4 @@ ADD_SUBDIRECTORY(lib/cnmem)
 LIST(APPEND SINGA_LINKER_LIBS cnmem)
 ADD_SUBDIRECTORY(src)
 ADD_SUBDIRECTORY(test)
+ADD_SUBDIRECTORY(examples)

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/fce5d813/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
new file mode 100644
index 0000000..b06f434
--- /dev/null
+++ b/examples/CMakeLists.txt
@@ -0,0 +1,8 @@
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include)
+
+AUX_SOURCE_DIRECTORY(cifar10 cifar_source)
+
+ADD_EXECUTABLE(alexnet ${cifar_source})
+ADD_DEPENDENCIES(alexnet singa_core singa_model singa_utils)
+TARGET_LINK_LIBRARIES(alexnet singa_core singa_utils singa_model protobuf 
${SINGA_LIBKER_LIBS})

Reply via email to