我遵循了以下指示:
https://gist.github.com/jarutis/ff28bca8cfb9ce0c8b1a
但是然后当我尝试:
在测试文件上THEANO_FLAGS = device = opencl0:0 python test.py时出现错误:
错误(theano.sandbox.gpuarray):已配置pygpu,但无法导入回溯(最近一次调用最近):文件“ /home/mesayantan/.local/lib/python2.7/site-packages/theano/sandbox/gpuarray / init .py“,第20行,在
import pygpu
在第7行的“ / usr / src / gtest / clBLAS / build / libgpuarray / pygpu / init .py”文件中
from . import gpuarray, elemwise, reduction
在第3行的“ /usr/src/gtest/clBLAS/build/libgpuarray/pygpu/elemwise.py”文件中
from .dtypes import dtype_to_ctype, get_common_dtype
在第6行的“ /usr/src/gtest/clBLAS/build/libgpuarray/pygpu/dtypes.py”文件中
from . import gpuarray
ImportError:无法导入名称gpuarray
我没有好主意。我是第一次使用所有这些。我正在使用Ubuntu 14.04 LTS。如何解决此错误?
我通过lipgpuarray网站上提供的分步安装解决了这个问题!
下载
git clone https://github.com/Theano/libgpuarray.git
cd libgpuarray
安装 libgpuarray
# extract or clone the source to <dir>
cd <dir>
mkdir Build
cd Build
# you can pass -DCMAKE_INSTALL_PREFIX=/path/to/somewhere to install to an alternate location
cmake .. -DCMAKE_BUILD_TYPE=Release # or Debug if you are investigating a crash
make
make install
cd ..
安装 pygpu
# This must be done after libgpuarray is installed as per instructions above.
python setup.py build
python setup.py install
资料来源:http : //deeplearning.net/software/libgpuarray/installation.html
这对我有用!祝好运
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句