This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Tiny example of 3-layer nerual network with dropout in 2nd hidden layer | |
| # Output layer is linear with L2 cost (regression model) | |
| # Hidden layer activation is tanh | |
| import numpy as np | |
| n_epochs = 100 | |
| n_samples = 100 | |
| n_in = 10 | |
| n_hidden = 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import struct | |
| import numpy as np | |
| """ | |
| MNist loading helper for Python 2.7. | |
| For Python 3.x, see https://gist.github.com/akesling/42393ccb868125071fdea77d98a0d2f0 | |
| Loosely inspired by http://abel.ee.ucla.edu/cvxopt/_downloads/mnist.py |