配置环境的各种坑(用anaconda里边安装,很多包的版本需要一起变化)
tensorflow-gpu tensorflow cudnn cudatoolikit sklearn
1.10.0 1.10.0 6.0 8.0 0.21.2 不报错,但是gpu不能加速
1.10.0 1.10.0 6.0 9.0 0.21.2 sklearn里报下边这个错
1.10.0 1.10.0 7.14 8.0 0.21.2 sklearn里报下边这个错
1.14.0 1.14.0 7.65 9.0 0.21.2 sklearn里报下边这个错
1.14.0 1.14.0 7.65 9.0 0.21.3 sklearn里报下边这个错
1.14.0 1.14.0 7.65 9.0 0.22 sklearn里报下边这个错
所以猜测不是版本的问题,参考:https://blog.csdn.net/u013044310/article/details/82874719的方法
在cmd环境里:
conda remove icc_rt --force
conda install icc_rt --no-deps
错误解决
报错:
Traceback (most recent call last):
File "D:\PyCharm Community Edition 2018.2.3\helpers\pydev\pydevd.py", line 1664, in <module>
main()
File "D:\PyCharm Community Edition 2018.2.3\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "D:\PyCharm Community Edition 2018.2.3\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\PyCharm Community Edition 2018.2.3\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/CNN/chengxu/SVM-CNN-12.22/main-mnist.py", line 23, in <module>
from blm import GenELMClassifier
File "E:\CNN\chengxu\SVM-CNN-12.22\blm.py", line 29, in <module>
from sklearn.utils import as_float_array
File "D:\anaconda\envs\zl\lib\site-packages\sklearn\__init__.py", line 76, in <module>
from .base import clone
File "D:\anaconda\envs\zl\lib\site-packages\sklearn\base.py", line 16, in <module>
from .utils import _IS_32BIT
File "D:\anaconda\envs\zl\lib\site-packages\sklearn\utils\__init__.py", line 20, in <module>
from .validation import (as_float_array,
File "D:\anaconda\envs\zl\lib\site-packages\sklearn\utils\validation.py", line 21, in <module>
from .fixes import _object_dtype_isnan
File "D:\anaconda\envs\zl\lib\site-packages\sklearn\utils\fixes.py", line 18, in <module>
from scipy.sparse.linalg import lsqr as sparse_lsqr # noqa
File "D:\anaconda\envs\zl\lib\site-packages\scipy\sparse\linalg\__init__.py", line 117, in <module>
from .eigen import *
File "D:\anaconda\envs\zl\lib\site-packages\scipy\sparse\linalg\eigen\__init__.py", line 11, in <module>
from .arpack import *
File "D:\anaconda\envs\zl\lib\site-packages\scipy\sparse\linalg\eigen\arpack\__init__.py", line 22, in <module>
from .arpack import *
File "D:\anaconda\envs\zl\lib\site-packages\scipy\sparse\linalg\eigen\arpack\arpack.py", line 45, in <module>
from . import _arpack
ImportError: DLL load failed: 找不到指定的程序。