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 ...