https://github.com/en10/ai-intro
Intro to Tensorflow, Keras and MNIST
https://github.com/en10/ai-intro
keras mnist tensorflow
Last synced: 2 months ago
JSON representation
Intro to Tensorflow, Keras and MNIST
- Host: GitHub
- URL: https://github.com/en10/ai-intro
- Owner: EN10
- Created: 2019-04-27T12:02:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-28T10:06:57.000Z (about 7 years ago)
- Last Synced: 2025-03-27T04:32:09.652Z (over 1 year ago)
- Topics: keras, mnist, tensorflow
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI Intro
Some of the key Libraries and Dataset used:
* [Colab](https://colab.research.google.com/notebooks/welcome.ipynb) a free progarmming environment.
* [Tensorflow](https://en.wikipedia.org/wiki/TensorFlow) as an AI Library created by Google and can be used in Python.
* [Keras](https://en.wikipedia.org/wiki/Keras) Also a Python AI library, it is used on top of Tensorflow. It allows models to be created faster and more easily than with Tensorflow alone.
* [MNIST](https://en.wikipedia.org/wiki/MNIST_database) A collection of 70,000 handwritten digits from 0-9, it is a commonly used dataset for training neural networks.

## Code Example
```python
# Point to the MNIST tensorflow directory
from tensorflow.examples.tutorials.mnist import input_data
# Downloads and formats MNIST
mnist = input_data.read_data_sets("./mnist", one_hot=True)
import keras
model = keras.models.Sequential()
# See model Image below, 784 pixels on the left and 10 neurons on the right
model.add(keras.layers.Dense(10, activation='softmax', input_shape=(784,)))
model.compile(optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy'])
# Trains the model by feeding 60,000 images
model.fit(mnist.train.images, mnist.train.labels,
epochs=5)
# Tests the model with 10,000 new test images
model.evaluate(mnist.test.images, mnist.test.labels)
```
Model: 
[Softmax](https://en.wikipedia.org/wiki/Softmax_function)
[Adam](https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Adam)
## References
* [EN10 Keras MNIST](https://github.com/EN10/KerasMNIST)
* [Keras Docs](https://keras.io/getting-started/sequential-model-guide)
* [Tensorflow Fashion MNIST](https://www.tensorflow.org/tutorials/keras/basic_classification)
* [Udacity TF Intro](https://eu.udacity.com/course/intro-to-tensorflow-for-deep-learning--ud187)