Training the model

Before we take a look at some core code snippets, let's first see how to train the model. First, get the repo by running the following on your Terminal:

 git clone https://github.com/jeffxtang/DeepReinforcementLearning

Then, set up a Keras and TensorFlow virtualenv if you hadn't already done so in Chapter 8, Predicting Stock Price with RNN:

cdmkdir ~/tf_kerasvirtualenv --system-site-packages ~/tf_keras/cd ~/tf_keras/source ./bin/activateeasy_install -U pip#On Mac:pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.4.0-py2-none-any.whl#On Ubuntu:pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.4.0-cp27-none-linux_x86_64.whleasy_install ipython pip ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.