2017-06-28 35 views
2

当使用固定 '请切换到gpuarray后端' 与cuda.use(警告)与keras

cuda.use('gpu0')

我得到

WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be removed in the next release (v0.10). Please switch to the gpuarray backend. You can get more information about how to switch at this URL: https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29

这是伟大的,但无处上我可以看到有关使用cuda.use()的任何URL。

我尝试了各种组合:theano.sandbox.cuda,use(),theano.gpuarray.use(),gpuarry.use()等等,并且耗尽了组合的可能性。我们应该怎么做?

回答

1

删除cuda.use和theano.sandbox.cuda。用此代替

import theano.gpuarray 

现在转到您的.theanorc配置文件。应在〜/ .theanorc如果Linux和改变全局设定

device = cuda0 

谷歌,如果你身边找不到theanorc文件。