CNTK is also version 2.1. The characteristic of the enhancements related to 2.1 is that deeprl is provided as a framework for reinforcement learning. You can find a reference at the link below. It seems that some logic is implemented besides Deep Q-Learning. •cntk.contrib.deeprl.agent.agent module •cntk.contrib.deeprl.agent.agent_factory module •cntk.contrib.deeprl.agent.policy_gradient module •cntk.contrib.deeprl.agent.qlearning module •cntk.contrib.deeprl.agent.random_agent module •cntk.contrib.deeprl.agent.tabular_qlearning module Also, although it has been supported since 2.0, it is becoming more widely used as it can be used as a backend for Keras.
I would like to introduce [Using Keras and Deep Q-Network to Play Flappy Bird] as an example of Keras. Originally created by Keras, it is a sample of reinforcement learning, but it has been ported to CNTK. The code is published in cntk / Examples / Reinforcement Learning / FlappingBirdWithKeras. Let's move the sample. Since the installation setup of CNTK is the same as in the RC era, [this article](https://analyticsai.wordpress.com/2017/04/04/cntk2-0b15%e3%82%a4%e3%83%b3 See% e3% 82% b9% e3% 83% 88% e3% 83% bc% e3% 83% ab /).
Keras can be installed from the command line that activates cntk below (it is better to upgrade to the latest version, so if you already have it installed, you should add the -U option)
pip install keras
In addition, create a configuration file ~ / .keras / keras.json. For Windows it will be C: \ Users \
{ "epsilon": 1e-07, "image_data_format": "channels_last", "backend": "cntk", "floatx": "float32" }
With the above, keras can be operated. You can check the operation below.
・ In case of GPU operation (It takes a terrible time without GPU) https://github.com/fchollet/keras/blob/master/examples/mnist_cnn.py
・ When GPU is not included https://github.com/fchollet/keras/blob/master/examples/mnist_mlp.py I think it is good. Then install the Flapping Bird dependencies
pip install pygame conda install scikit-learn conda install scikit-image
In this state, it can operate on both Windows and Linux. Also, since it runs on the GPU, you can expect high-speed operation.
CNTK is also 2.1 and various parts have been strengthened. The evolution of the field of enhanced learning is expected in the future.
Recommended Posts