-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c06a43b
Showing
16 changed files
with
11,266 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.o | ||
*.a | ||
*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Empty file.
Oops, something went wrong.