Tim*_*Tim 8 python mnist theano
我对theano比较新,我想在我的GPU上运行mnist示例,但我得到以下输出:
Using gpu device 0: GeForce GTX 970M (CNMeM is disabled)
Loading data...
Building model and compiling functions...
WARNING (theano.gof.compilelock):
Overriding existing lock by dead process '9700' (I am process '10632')
DEBUG: nvcc STDOUT mod.cu
Creating library
C:/Users/user/AppData/Local/Theano
/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_71_Stepping_1_GenuineIntel-3.4.3-64
/tmp55nlvvvo/m25b839e7715203be227800f03e7c8fe8.lib
and object
C:/Users/user/AppData/Local/Theano
/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_71_Stepping_1_GenuineIntel-3.4.3-64
/tmp55nlvvvo/m25b839e7715203be227800f03e7c8fe8.exp
Run Code Online (Sandbox Code Playgroud)
它不断输出DEBUG消息而不输出任何mnist.我有一个工作版的nvcc:
C:\Users\user>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:49:10_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
Run Code Online (Sandbox Code Playgroud)
我的.theanorc档案:
[global]
floatX = float32
device = gpu0
[nvcc]
fastmath = True
Run Code Online (Sandbox Code Playgroud)
我怎么解决这个问题?
小智 1
我有一个类似的问题。搜索谷歌并获取代码。https://github.com/Theano/Theano/blob/master/theano/sandbox/cuda/nvcc_compiler.py
p = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
nvcc_stdout_raw, nvcc_stderr_raw = p.communicate()[:2]
console_encoding = getpreferredencoding()
nvcc_stdout = decode_with(nvcc_stdout_raw, console_encoding)
nvcc_stderr = decode_with(nvcc_stderr_raw, console_encoding)
if nvcc_stdout:
# this doesn't happen to my knowledge
print("DEBUG: nvcc STDOUT", nvcc_stdout, file=sys.stderr)
Run Code Online (Sandbox Code Playgroud)
看来 nvcc 有错误输出。
但在我的情况下,它的输出看起来像
调试:nvcc STDOUT mod.cu
调试:nvcc STDOUT mod.cu
有时程序在此之后可以正常工作,有时则无法工作。这很奇怪。抱歉我无法发表评论,所以我只是发布答案。