Skip to content

danielholmes/neural-net

Repository files navigation

Neural Net

Build Status

A simple binary classification Neural Net implementation

Dependencies

Setup

stack init

Build

stack build --pedantic

Continuous:

stack build --pedantic --file-watch

Only one executable:

stack build neural-net:exe:image-eg --pedantic --file-watch

Running Tests

stack test --pedantic

With watching of files for changes

stack test --file-watch --pedantic

With error stack traces

stack test --pedantic --file-watch --profile

With more tracing

stack test --pedantic --file-watch --trace .

Running

stack exec neural-net-exe -- --help

Simple Logistic Regression example:

stack exec logreg -- -c -l 0.005 -i 1000 examples/simple-csv/train.csv examples/simple-csv/test.csv

Binary image classification Log Reg example (requires copying in some files to /examples):

stack exec image-logreg -- -l 0.005 -i 1000 \
    examples/images/nn-course-train/1 \
    examples/images/nn-course-train/0 \
    examples/images/nn-course-test/1 \
    examples/images/nn-course-test/0

Binary image classification Deep NN example (requires copying in some files to /examples):

stack exec image-deep -- -l 0.0075 -i 2500 \
    examples/images/nn-course-train/1 \
    examples/images/nn-course-train/0 \
    examples/images/nn-course-test/1 \
    examples/images/nn-course-test/0

Running with Time Profiling

stack build neural-net:exe:image-deep --pedantic --profile
stack exec image-deep -- -l 0.0075 -i 2500 \
    examples/images/nn-course-train/1 \
    examples/images/nn-course-train/0 \
    examples/images/nn-course-test/1 \
    examples/images/nn-course-test/0 \
    +RTS -p

Releases

No releases published

Packages

No packages published