Skip to content

Instantly share code, notes, and snippets.

View rave78's full-sized avatar

Federico Raue rave78

View GitHub Profile
@rave78
rave78 / draw_neural_net.py
Created November 29, 2015 08:26 — forked from craffel/draw_neural_net.py
Draw a neural network diagram with matplotlib!
import matplotlib.pyplot as plt
def draw_neural_net(ax, left, right, bottom, top, layer_sizes):
'''
Draw a neural network cartoon using matplotilb.
:usage:
>>> fig = plt.figure(figsize=(12, 12))
>>> draw_neural_net(fig.gca(), .1, .9, .1, .9, [4, 7, 2])