Keras with Tensorflow backend on GPU. MKL ERROR: Parameter 4 was incorrect on entry to DLASCL

Keras with Tensorflow backend on GPU. MKL ERROR: Parameter 4 was incorrect on entry to DLASCL

我使用以下命令将支持 GPU 的 Tensorflow 和 Keras 安装到 Anaconda (v1.6.5) 的环境中:

conda install -n EnvName tensorflow-gpu
conda install -n EnvName -c conda-forge keras-gpu

我的机器上有 NVIDIA Quadro 2200K,驱动程序为 v384.66、cuda-8.0、cudnn 7.0

当我在训练阶段尝试使用 Keras 运行 python 代码时,我得到以下结果

Intel MKL ERROR: Parameter 4 was incorrect on entry to DLASCL.

以后

File "/home/User/anaconda3/envs/keras_gpu/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 99, in _raise_linalgerror_svd_nonconvergence raise LinAlgError("SVD did not converge") numpy.linalg.linalg.LinAlgError: SVD did not converge

其他相关 sources 建议检查 NaN 和 Inf 的数据,但我的数据肯定是干净的。顺便说一下,CPU 版本的安装工作正常,只有在 GPU

上尝试 运行 时才会出现问题

我尝试重新安装 Anaconda,重新安装 CUDA 和 numpy,但没有成功。

问题出在包 mkl (2018.0.0) - 它似乎是最近发布的,并且与 Tensorflow(1.3.0) 提供的某些包的版本冲突) 和 Keras(2.0.5) 通过 conda*.

所以我使用 Anaconda Navigator 手动将 mkl 降级到 v11.3.3,这导致其他软件包自动降级,现在一切正常。

如果您使用的是 Anaconda,这将有所帮助:

conda update mkl