Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mnoukhov/tf-estimator-mnist
MNIST tutorial based around tf.Estimator and tf.keras.layers
https://github.com/mnoukhov/tf-estimator-mnist
Last synced: 25 days ago
JSON representation
MNIST tutorial based around tf.Estimator and tf.keras.layers
- Host: GitHub
- URL: https://github.com/mnoukhov/tf-estimator-mnist
- Owner: mnoukhov
- License: mit
- Created: 2018-07-06T23:35:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-16T01:21:05.000Z (almost 6 years ago)
- Last Synced: 2024-10-28T00:21:25.306Z (2 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MNIST with tf.Estimator and tf.keras.layers
MNIST tutorial using high level Tensorflow libraries: tf.Estimator and tf.keras.layers## why those libraries?
these libraries are, in my opinion, the libraries in tensorflow that are flexible enough to be used for most projects while being easy enough to understand, and having simple interfaces## how to run
`python mnist.py` and that's it!## what's going on?
`dataset.py`
- `download(...)` downloads the MNIST dataset
- `dataset(...)` checks the data is correct, converts the image from `int` pixel values (0 - 255) to a `float` (0.0 - 1.0), and turns the data into a `tf.data.Dataset``mnist.py`
- `train_data(...)` and `eval_data(...)` get the right data and split it into batches
- `lenet(...)` defines our convolutional neural network model, [lenet](http://yann.lecun.com/exdb/lenet/), as a series of layers
- `model_function(...)` tells our model what to do for training data (learn on the data, output the loss) and eval data (don't learn, just run our model and output our accuracy)
- `main(...)` puts everything together and goes through the data, iteratively training on a batch of training data then testing on a batch of eval data