From the course: Building Recommender Systems with Machine Learning and AI

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Handwriting recognition with Keras

Handwriting recognition with Keras

Let's go back to the Jupyter notebook, make sure that you're in the rexus environment first, and import the Keras.ipynb file from the deep learning intro folder. Once it's uploaded, select it to fire up that notebook. Again, Keras is just a higher level API in TensorFlow that makes deep learning a lot easier. We'll start off by importing all the stuff we need, assembling the layers of a neural network. We're going to import the Dense and Dropout layers as well, so we can actually add some new things into this neural network to make it even better, and prevent overfitting. Finally, we will import the RMSprop optimizer, which is what we're going to use for our gradient ascent. Hit shift enter to process that block. Let's go ahead and load up the mnist dataset that we used in the previous example. Keras's version is a little bit different, it actually has 60,000 training samples, as opposed to 55,000, but still 10,000 test samples. That's just a one line operation. Next we need to…

Contents