Keras ve Tensorflow yükledim fakat çalıştırınca hata çıkıyor

Arkadaşlar başlıktada dile getirdiğim gibi hata alıyorum çağırdığımda bunu nasıl çözebilirim rica etsem yardım edermisiniz.

Hata :
C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\python.exe C:/Users/ornekbirkullanici/Desktop/Python/yapay_zeka_calismalari.py
Using TensorFlow backend.
Traceback (most recent call last):
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, fp, pathname, description)
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Devingen bağlantı kitaplığını (DLL) başlatma işlemi başarısız.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:/Users/ornekbirkullanici/Desktop/Python/yapay_zeka_calismalari.py”, line 1, in
from keras.models import Sequential
File “C:\Users\ornekbirkullanici\AppData\Roaming\Python\Python37\site-packages\keras_init_.py”, line 3, in
from . import utils
File “C:\Users\ornekbirkullanici\AppData\Roaming\Python\Python37\site-packages\keras\utils_init_.py”, line 6, in
from . import conv_utils
File “C:\Users\ornekbirkullanici\AppData\Roaming\Python\Python37\site-packages\keras\utils\conv_utils.py”, line 9, in
from … import backend as K
File “C:\Users\ornekbirkullanici\AppData\Roaming\Python\Python37\site-packages\keras\backend_init_.py”, line 1, in
from .load_backend import epsilon
File “C:\Users\ornekbirkullanici\AppData\Roaming\Python\Python37\site-packages\keras\backend\load_backend.py”, line 90, in
from .tensorflow_backend import *
File “C:\Users\ornekbirkullanici\AppData\Roaming\Python\Python37\site-packages\keras\backend\tensorflow_backend.py”, line 5, in
import tensorflow as tf
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_init_.py”, line 98, in
from tensorflow_core import *
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core_init_.py”, line 40, in
from tensorflow.python.tools import module_util as module_util
File "C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_init
.py", line 50, in getattr
module = self.load()
File "C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_init
.py", line 44, in _load
module = importlib.import_module(self.name)
File "C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\importlib_init
.py", line 127, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python_init
.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, fp, pathname, description)
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “C:\Users\ornekbirkullanici\AppData\Local\Programs\Python\Python37\lib\imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Devingen bağlantı kitaplığını (DLL) başlatma işlemi başarısız.

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.

Process finished with exit code 1

KOD :
from keras.models import Sequential
from keras.layers import Dense
import numpy

burada random.seed metoduyla rastgele sayı üretiyoruz

numpy.random.seed(7)

Paylaştığınız hata çıktısındaki linkte tensorflow modülüyle alakalı rapor edilmiş hatalar yer alıyor.

Sizin aldığınız hataya en yakın hata sanırım şu:

Sorunun çözümüyle alakalı farklı yollar denenmiş. Bunlardan birisi şu:

I’ve had this issue in the past and it was because I had the wrong version of CUDNN. You could try downloading a few of them and see if any of those work.

Bir diğeri de şu:

I just downgraded TensorFlow to 1.10.0 and it worked

pip install tensorflow-gpu==1.10.0

Bu sayfayı bir inceleyin isterseniz.

1 Like

Hocam sürümleri düşürerek yapıyorum halen hatalar veriyor ayrıca keras ve tensorflow aynı kütüphanede değil fakat tensorflow hatası almaktayım.Yada ben mi yalnış biliyorum keras ve tensorflowun aynı kütüphanede olmadığı konusunda

Şu gönderide bir öneri verilmiş acaba faydası dokunur mu?

You have to use CUDA 10.0 for tensorflow-gpu-1.13.1 (don’t forget to download cuDNN 7.5 for CUDA 10.0 too).