cnn-from-scratch icon indicating copy to clipboard operation
cnn-from-scratch copied to clipboard

A Convolutional Neural Network implemented from scratch (using only numpy) in Python.

A Convolution Neural Network (CNN) From Scratch

This was written for my 2-part blog post series on CNNs:

To see the code (forward-phase only) referenced in Part 1, visit the forward-only branch.

Usage

Install dependencies:

$ pip install -r requirements.txt

Then, run it with no arguments:

$ python cnn.py
$ python cnn_keras.py

You can also run this code in your browser.

More

You may also be interested in a Neural Network implemented from scratch in Python, which was written for my introduction to Neural Networks.