Skip to content

Latest commit

 

History

History

Understanding_and_Creating_NNs

Nothing But NumPy: Understanding & Creating Neural Networks with Computational Graphs from Scratch

This repository is part of the blog post "Nothing but NumPy: Understanding & Creating Neural Networks with Computational Graphs from Scratch"

Forks rather than Clones, Stars rather than Views 🙏

Layers

The Layers directory contains the classes for:

  1. Linear Layer
  2. Activation Layer:
    • Sigmoid Layer

util

util directory contains utility fuctions. It has the following files with the following functions:

  1. paramInitializer.py

    • initialize_parameters(n_in, n_out, ini_type='plain')
  2. utilities.py

    • compute_cost(Y, Y_hat)
    • predict(X, Y, Zs, As)
    • plot_learning_curve(costs, learning_rate, total_epochs, save=False)
    • predict_dec(Zs, As, X)
    • plot_decision_boundary(model, X, Y, feat_crosses=None, save=False)
    • plot_decision_boundary_shaded(model, X, Y, feat_crosses=None, save=False)

As examples following neural network architectures have been implemented:

  1. A 2-layer neural network on XOR data

Architecture of 2-layer neural network

  1. A 1-layer neural network with a feature cross on XOR data

Architecture of 1-layer neural network with a featurecross

  1. A 3-layer neural network on XOR data

Architecture of 3-layer neural network


Find me on twitter for any questions or suggestions.