在python程序期间找不到'nvcuda.dll'

时间:2019-06-26 08:52:29

标签: python windows

我已经运行了以下程序

from keras.models import Sequential
from keras.layers import Dense
import numpy
# fix random seed for reproducibility
numpy.random.seed(7)
#we are going to use Pima Indians onset of diabtes
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",")

X = dataset[:, 0:8]
Y = dataset[:, 8]
model = Sequential()
model.add(Dense(12, input_dim=8, activation='relu'))
model.add(Dense(8, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
model.fit(X, Y, epochs=150, batch_size=10)
scores = model.evaluate(X, Y)
print("\n%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))

但是它给了我以下错误:

ImportError: Could not find 'nvcuda.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Typically it is installed ,in 'C:\Windows\System32'. If it is not present, ensure that you have a CUDA-capable GPU with the correct driver installed.

我已经阅读了很多文档,我阅读了以下文档 installing cuda

但是在这里它说我必须先安装Visual Studio,然后应用程序,但是我不需要Visual Studio,为什么我的计算机过载?我能以一种更简单的方式做吗?提前感谢

0 个答案:

没有答案