Commit e3e21c61 authored by Yuxin Wu's avatar Yuxin Wu

A3C notes about cpu

parent 6af22cdd
...@@ -6,7 +6,10 @@ Implemented A3C in [Asynchronous Methods for Deep Reinforcement Learning](http:/ ...@@ -6,7 +6,10 @@ Implemented A3C in [Asynchronous Methods for Deep Reinforcement Learning](http:/
`./train-atari.py --env Breakout-v0 --gpu 0` `./train-atari.py --env Breakout-v0 --gpu 0`
The pre-trained models are all trained with 4 GPUs. It should run at a speed of 6~10 iteration/s on 1 GPU.
Training with a significant slower speed (e.g. on CPU) will give bad performance,
probably because of async issues.
The pre-trained models are all trained with 4 GPUs for about 2 days.
### To run a pretrained Atari model for 100 episodes: ### To run a pretrained Atari model for 100 episodes:
......
...@@ -247,6 +247,7 @@ if __name__ == '__main__': ...@@ -247,6 +247,7 @@ if __name__ == '__main__':
logger.info("[BA3C] Train on gpu {} and infer on gpu {}".format( logger.info("[BA3C] Train on gpu {} and infer on gpu {}".format(
','.join(map(str, train_tower)), ','.join(map(str, predict_tower)))) ','.join(map(str, train_tower)), ','.join(map(str, predict_tower))))
else: else:
logger.warn("Without GPU this model will never learn! CPU is only useful for debug.")
nr_gpu = 0 nr_gpu = 0
PREDICTOR_THREAD = 1 PREDICTOR_THREAD = 1
predict_tower = [0] predict_tower = [0]
......
...@@ -11,7 +11,6 @@ Training examples with __reproducible__ and meaningful performance. ...@@ -11,7 +11,6 @@ Training examples with __reproducible__ and meaningful performance.
+ [ResNet for ImageNet/Cifar10/SVHN](ResNet) + [ResNet for ImageNet/Cifar10/SVHN](ResNet)
+ [Holistically-Nested Edge Detection](HED) + [Holistically-Nested Edge Detection](HED)
+ [Spatial Transformer Networks on MNIST addition](SpatialTransformer) + [Spatial Transformer Networks on MNIST addition](SpatialTransformer)
+ [Generative Adversarial Networks](GAN) + [Generative Adversarial Networks variants](GAN)
+ [DisturbLabel -- I don't believe the paper](DisturbLabel)
+ Reinforcement learning (DQN, A3C) on [Atari games](Atari2600) and [demos on OpenAI Gym](OpenAIGym). + Reinforcement learning (DQN, A3C) on [Atari games](Atari2600) and [demos on OpenAI Gym](OpenAIGym).
+ [char-rnn for fun](char-rnn) + [char-rnn for fun](char-rnn)
...@@ -120,9 +120,9 @@ def FixedUnPooling(x, shape, unpool_mat=None): ...@@ -120,9 +120,9 @@ def FixedUnPooling(x, shape, unpool_mat=None):
@layer_register() @layer_register()
def BilinearUpSample(x, shape): def BilinearUpSample(x, shape):
""" """
Non-parametric bilinear upsample the input images. Deterministic bilinear upsample the input images.
:param x: input NHWC tensor :param x: input NHWC tensor
:param shape: an integer :param shape: an integer, the upsample factor
""" """
def bilinear_conv_filler(s): def bilinear_conv_filler(s):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment