https://github.com/williamfalcon/theano-deep-neural-net
Deep neural network implementation using theano and lasagne
https://github.com/williamfalcon/theano-deep-neural-net
Last synced: over 1 year ago
JSON representation
Deep neural network implementation using theano and lasagne
- Host: GitHub
- URL: https://github.com/williamfalcon/theano-deep-neural-net
- Owner: williamFalcon
- License: mit
- Created: 2016-07-10T23:02:14.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-11T15:36:06.000Z (almost 10 years ago)
- Last Synced: 2025-01-22T11:47:41.700Z (over 1 year ago)
- Language: Python
- Size: 8.7 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# theano-deep-neural-net
Deep neural network implementation using theano and lasagne
Neural network implementation mostly based on the [mnist lasagne tutorial](https://github.com/Lasagne/Lasagne/blob/master/examples/mnist.py)
## Use
```python
from dnn.dnn import MLP
X_train, y_train, X_val, y_val, X_test, y_test = load_dataset()
# images are 28*28 pixels. Shown as a vector of 28*28 length
# train algo
nn = MLP(input_dim_count=28*28, output_size=10)
nn.fit(X_train, y_train, X_val, y_val, X_test, y_test, epochs=50)
# predict on first 5 of test
x_preds = X_test[0:5]
ans = nn.predict(x_preds)
# print prediction results
print(ans)
print(y_test[0:5])
```