Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Dewar mikedewar

View GitHub Profile
@dwf
dwf / hinton.py
Created Feb 1, 2010
A function for drawing Hinton diagrams with matplotlib.
View hinton.py
#!/usr/bin/env python
"""
Draws Hinton diagrams using matplotlib ( http://matplotlib.sf.net/ ).
Hinton diagrams are a handy way of visualizing weight matrices, using
colour to denote sign and area to denote magnitude.
By David Warde-Farley -- user AT cs dot toronto dot edu (user = dwf)
with thanks to Geoffrey Hinton for providing the MATLAB code off of
which this is modeled.
You can’t perform that action at this time.