Skip to content

elifriedman/keras_rl_tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Hands-On Reinforcement Learning Tutorial!

Yam Peleg



1. How to tune in?

If you wanted to listen to someone speaks three hours straight about deep learning, You could have done so by the comfort of your house.

But you are here! Physically!

So...

This tutorial is extremely hands-on! You are strongly encouraged to play with it yourself!

Options:

$\varepsilon$. Run the notebooks locally

  • git clone https://github.com/ypeleg/keras_rl_tutorial

  • You might think that the goal of this tutorial is for you to play around with Deep Learning. This is wrong.

  • The Rreal Goal of the Tutorial is To give you the Flexibility to use this In your own domain!

Therefore, this is by far the best option if you can get it working!


a. Play with the notebooks dynamically (on Google Colab)


b. Play with the notebooks dynamically (on MyBinder)

Binder

Anyone can use the mybinder.org website (by clicking on the icon above) to run the notebook in her/his web-browser. You can then play with it as long as you like, for instance by modifying the values or experimenting with the code.

c. View the notebooks statically. (if all else failed..)


Outline at a glance

  • Part I: Introduction

    • Intro Keras

      • Functional API
    • Reinforcement Learning

      • Intro
      • Bandit
      • Q learning
      • Policy Gradients

One More thing..

You are probably famillier with this.. so..

The tachles.py file

In this tutorial many of the irrelevant details are hidden in a special file called "tachles.py". Simply go:

import tachles

Requirements

This tutorial requires the following packages:

(Optional but recommended):

The easiest way to get (most) these is to use an all-in-one installer such as Anaconda from Continuum. These are available for multiple architectures.


Python Version

I'm currently running this tutorial with Python 3 on Anaconda

!python --version

Configure Keras with tensorflow

  1. Create the keras.json (if it does not exist):
touch $HOME/.keras/keras.json
  1. Copy the following content into the file:
{
    "epsilon": 1e-07,
    "backend": "tensorflow",
    "floatx": "float32",
    "image_data_format": "channels_last"
}
!cat ~/.keras/keras.json

Test if everything is up&running

1. Check import

import numpy as np
import scipy as sp
import pandas as pd
import matplotlib.pyplot as plt
import sklearn
import keras

2. Check installeded Versions

import numpy
print('numpy:', numpy.__version__)

import scipy
print('scipy:', scipy.__version__)

import matplotlib
print('matplotlib:', matplotlib.__version__)

import IPython
print('iPython:', IPython.__version__)

import sklearn
print('scikit-learn:', sklearn.__version__)
import keras
print('keras: ', keras.__version__)

# optional
import theano
print('Theano: ', theano.__version__)

import tensorflow as tf
print('Tensorflow: ', tf.__version__)

If everything worked till down here, you're ready to start!


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors