我试图获取编写的DCGAN以便在GPU上进行训练,但是我遇到了一些我通常没有的模糊错误。
我有python 3.6,使用pycharm创建了一个新的venv并首先安装了tensorflow-gpu,然后安装了keras,现在我得到了以下内容。该代码太大了,无法在此处托管,但是如果安装了常规的tensorflow软件包,它可以正常运行并且运行良好。
我有Cuda 10.1,是最新的nvidia驱动程序。
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
上面是我的代码
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\Tyler\PycharmProjects\low\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Tyler\PycharmProjects\low\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Tyler\PycharmProjects\low\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.