Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dougszumski committed Feb 26, 2015
0 parents commit c06a43b
Show file tree
Hide file tree
Showing 16 changed files with 11,266 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.o
*.a
*~

33 changes: 33 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cmake_minimum_required (VERSION 2.8)
project (NNet)

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR})

include_directories(src)

set (CMAKE_C_FLAGS "-Wall -std=c99 -O2")

set(LIB_SRC
${PROJECT_SOURCE_DIR}/src/nnet.c
${PROJECT_SOURCE_DIR}/src/loader.c
${PROJECT_SOURCE_DIR}/src/math_utils.c
)

add_library(nnet STATIC ${LIB_SRC})

set(MAIN_SRC
${PROJECT_SOURCE_DIR}/src/main.c
)

add_executable(run ${MAIN_SRC})
target_link_libraries (run "-lgsl -lgslcblas -lm" nnet)

set (CMAKE_CXX_FLAGS "-Wall -std=c++11")

set(TEST_SRC
${PROJECT_SOURCE_DIR}/src/tests.cpp
)

add_executable(tests ${TEST_SRC})
target_link_libraries (tests "-lgsl -lgslcblas -lm" nnet)

674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
This is a C implementation of the neural network for handwriting recognition
outlined in the free online book by Michael Nielsen:

http://neuralnetworksanddeeplearning.com/

It was written as a learning exercise, and is essentially a port of Michael's
Python implementation here:

https://github.com/mnielsen/neural-networks-and-deep-learning

To use it:

> Install the GNU Scientic library, GCC, G++

> Download the training data:

http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz

> Unzip the data into ./dat

> Build using cmake eg. from the project directory:
> cd build
> cmake ..
> make

> Run from the project folder:
> Tests with ./tests
> Train the network with ./run

> Read the book!
Empty file added build/.gitkeep
Empty file.
Empty file added dat/.gitkeep
Empty file.
Loading

0 comments on commit c06a43b

Please sign in to comment.