初始 DQN 程序 所遇到的问题

  最近在看 DQN,但是想试试别人放出来的 code,但是发现,额,各种问题,在此记录,以备不时之需!

  问题1.


wangxiao@GTX980:~/Documents/DRL/DQN-tensorflow-master$ python main.py --env_name=Breakout-v0 --is_train=True
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:99] Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH: /home/wangxiao/torch/install/lib:/home/wangxiao/torch/install/lib:/home/wangxiao/torch/install/lib:/home/wangxiao/torch/install/lib:
I tensorflow/stream_executor/cuda/cuda_dnn.cc:1562] Unable to load cuDNN DSO
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
[*] GPU : 1.0000
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:900] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: GeForce GTX 980
major: 5 minor: 2 memoryClockRate (GHz) 1.329
pciBusID 0000:01:00.0
Total memory: 4.00GiB
Free memory: 3.58GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 980, pci bus id: 0000:01:00.0)
[2016-07-03 09:14:02,576] Making new env: Breakout-v0
{'_save_step': 50000,
'_test_step': 10000,
'action_repeat': 4,
'backend': 'tf',
'batch_size': 32,
'cnn_format': 'NCHW',
'discount': 0.99,
'display': False,
'env_name': 'Breakout-v0',
'env_type': 'simple',
'ep_end': 0.1,
'ep_end_t': 1000000,
'ep_start': 1.0,
'history_length': 4,
'learn_start': 50000.0,
'learning_rate': 0.00025,
'learning_rate_decay': 0.96,
'learning_rate_decay_step': 50000,
'learning_rate_minimum': 0.00025,
'max_delta': 1,
'max_reward': 1.0,
'max_step': 50000000,
'memory_size': 1000000,
'min_delta': -1,
'min_reward': -1.0,
'model': 'm2',
'random_start': 30,
'scale': 10000,
'screen_height': 84,
'screen_width': 84,
'target_q_update_step': 10000,
'train_frequency': 4}

E tensorflow/stream_executor/cuda/cuda_driver.cc:932] failed to allocate 3.58G (3844833280 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
[*] Loading checkpoints...
[!] Load FAILED: checkpoints/Breakout-v0/min_delta--1/max_delta-1/history_length-4/train_frequency-4/target_q_update_step-10000/memory_size-1000000/action_repeat-4/ep_end_t-1000000/min_reward--1.0/backend-tf/random_start-30/scale-10000/env_type-simple/learning_rate_decay_step-50000/ep_start-1.0/screen_width-84/learn_start-50000.0/cnn_format-NCHW/learning_rate-0.00025/batch_size-32/discount-0.99/max_step-50000000/max_reward-1.0/learning_rate_decay-0.96/learning_rate_minimum-0.00025/env_name-Breakout-v0/ep_end-0.1/model-m2/screen_height-84/
0%| | 49970/50000000 [01:06<18:20:10, 756.70it/s]F tensorflow/stream_executor/cuda/cuda_dnn.cc:204] could not find cudnnCreate in cudnn DSO; dlerror: /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so: undefined symbol: cudnnCreate
Aborted


那么就搜到了如下的答案: link:http://stackoverflow.com/questions/35702403/tensorflow-0-7-1-with-cuda-toolkit-7-5-and-cudnn-7-0

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"

export CUDA_HOME=/usr/local/cuda

或者,copy the cuDNN libraries to /usr/local/cuda/lib64. 我两个同时执行的,所以 不知道哪个起作用了,好吧,但是再执行,确实是变成了另一个问题,即:


E tensorflow/stream_executor/cuda/cuda_driver.cc:932] failed to allocate 3.58G (3844702208 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
[*] Loading checkpoints...
[!] Load FAILED: checkpoints/Breakout-v0/min_delta--1/max_delta-1/history_length-4/train_frequency-4/target_q_update_step-10000/memory_size-1000000/action_repeat-4/ep_end_t-1000000/min_reward--1.0/backend-tf/random_start-30/scale-10000/env_type-simple/learning_rate_decay_step-50000/ep_start-1.0/screen_width-84/learn_start-50000.0/cnn_format-NCHW/learning_rate-0.00025/batch_size-32/discount-0.99/max_step-50000000/max_reward-1.0/learning_rate_decay-0.96/learning_rate_minimum-0.00025/env_name-Breakout-v0/ep_end-0.1/model-m2/screen_height-84/
0%| | 49983/50000000 [01:04<18:01:04, 770.06it/s]F tensorflow/stream_executor/cuda/cuda_dnn.cc:220] could not find cudnnConvolutionBackwardFilter_v2 in cudnn DSO; dlerror: /usr/local/cuda/lib64/libcudnn.so: undefined symbol: cudnnConvolutionBackwardFilter_v2
Aborted
wangxiao@GTX980:~/Documents/DRL/DQN-tensorflow-master$


  然后就发现,cudnn 这么多问题!

  于是乎,我就将 cudnn 6.5 换成了 cudnn 7.0 版本,重新配置了一下,然后在执行:

  

  仍然在加载 检查点 (checkpoint),不知道什么时候会断掉?

  额 貌似可以了。。。

  

  Ok 大家发现了吧 原来主要原因在于 cndnn 的版本问题。


Question 2:

   when running the code from: https://github.com/kuz/DeepMind-Atari-Deep-Q-Learner

  It shown me a mistake, i.e.  no module named AleWrap  

    Don't worry, just run the following operation:

  luarocks install https://raw.githubusercontent.com/lake4790k/xitari/master/xitari-0-0.rockspec  
  luarocks install https://raw.githubusercontent.com/Kaixhin/alewrap/master/alewrap-0-0.rockspec
  luarocks install https://raw.githubusercontent.com/Kaixhin/rlenvs/master/rocks/rlenvs-scm-1.rockspec   everything will be ok and you will you see something like this:
  


Question 3:
 
 
利用lua 读取和显示图像:
  
 

   可以发现上述过程, 其实只能一张一张的展示图像, 怎么把多张图像放到一个窗口中进行显示呢?  见下图:

   效果如下:

    

  

初始 DQN 程序 所遇到的问题的更多相关文章

  1. 窗体==>>初始Windows程序

    初识Windows程序 01.创建Windows程序(VS) 01.打开Visual Studio开发工具 02.选择"文件"→"新建"→"项目&qu ...

  2. [转载]使用mpvue搭建一个初始小程序

    1. 初始化一个 mpvue 项目 现代前端开发框架和环境都是需要 Node.js 的,如果没有的话,请先下载 nodejs 并安装. 然后打开命令行工具: # 1. 先检查下 Node.js 是否安 ...

  3. 使用mpvue搭建一个初始小程序

    1. 初始化一个 mpvue 项目 现代前端开发框架和环境都是需要 Node.js 的,如果没有的话,请先下载 nodejs 并安装. 然后打开命令行工具: # 1. 先检查下 Node.js 是否安 ...

  4. 初始Windows程序

    1.属性 窗体标题 Name  窗体的图标 Icon  背景图片 BackgroundImage 背景颜色 BackColor  最大化按钮 MaxIMonBox  最小化按钮 Minimun 窗体边 ...

  5. 使用inno setup打包程序完整脚本(.net框架检测,重复安装检测)

    ; 脚本由 Inno Setup 脚本向导 生成!; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档! #define MyAppName "小小鸟软件"#def ...

  6. Windows Azure 网站:应用程序字符串和连接字符串的工作原理

    编辑人员注释:本文章由 Windows Azure 网站团队的首席项目经理 Stefan Schackow 撰写. Windows Azure 网站上有一个方便的功能,即开发人员可将 Azure 中的 ...

  7. 微信小程序+和风天气完成天气预报

    <冷暖自知>天气小程序 学无止境,以玩儿玩儿的心态去学习! 花半天时间完成简单的小程序应用.适合小程序初学者. 申请小程序帐号: https://mp.weixin.qq.com/wxop ...

  8. 微信小程序快速开发上手

    微信小程序快速开发上手 介绍: 从实战开发角度,完整系统地介绍了小程序的开发环境.小程序的结构.小程序的组件与小程序的API,并提供了多个开发实例帮助读者快速掌握小程序的开发技能,并能自己动手开发出小 ...

  9. 微信小程序笔记<一>初识小程序

    一.IDE界面介绍 编辑界面 调试界面 项目管理界面 左侧工具介绍 二.项目文件类型及结构介绍 这是一个初始小程序的项目目录,其中涉及四种文件类型: *.js:JavaScript文件(JavaScr ...

随机推荐

  1. java连接数据库时的报错

    //java连接数据库时的报错 1 package Java数据库编程; import java.sql.DriverManager; import java.sql.SQLException; im ...

  2. requests爬取百度贴吧:python 美女 3

    import requests import sys class Tieba(object): def __init__(self, tieba_name, pn): self.tieba_name ...

  3. (1.3)mysql 事务控制和锁定语句

    (1.3)mysql 事务控制和锁定语句 lock table 参考转载自:https://www.cnblogs.com/kerrycode/p/6991502.html 关键词:mysql loc ...

  4. sql批量修改wordpress文章发布时间

    有时为了体现wordpress文章的更新程度,会在后台那边重新设置发布时间,有没更简单的方法呢?用sql批量修改wordpress文章发布时间怎么操作呢? UPDATE `wp_posts` SET ...

  5. UILabel富文本 段落格式以及UILabel添加图片

    之前文本整理有一点乱,这边重新整理一下,下面是效果图,一共两个UILabel, 富文本整理: /*NSForegroundColorAttributeName设置字体颜色,对象UIColor; NSP ...

  6. android 代码edittext删除或者替换光标处的字串

    https://stackoverflow.com/questions/3609174/android-insert-text-into-edittext-at-current-position Cp ...

  7. 用lua扩展你的Nginx(整理)

    首先得声明.这不是我的原创,是在网上搜索到的一篇文章,原著是谁也搞不清楚了.按风格应该是属于章亦春的文章. 整理花了不少时间,所以就暂写成原创吧. 一. 概述 Nginx是一个高性能.支持高并发的,轻 ...

  8. PAT Counting Leaves[一般]

    1004 Counting Leaves (30)(30 分) A family hierarchy is usually presented by a pedigree tree. Your job ...

  9. [PAT]A+B Format[简单]

    1001 A+B Format (20)(20 分) Calculate a + b and output the sum in standard format -- that is, the dig ...

  10. [LeetCode] 836. Rectangle Overlap_Easy

    A rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bot ...