使用Tensorflow 2.3.0 CPU时Keras.preprocessing无法加载

问题描述

我正在使用Jupyter和Tensorflow 2.0.0,一切正常,直到我开始使用Keras进行预处理。它似乎未在2.0.0中运行,因此我升级到Tensorflow 2.3.0,并且不断收到DLL错误

'''
ImportError                               Traceback (most recent call last)
~\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
     63   try:
---> 64     from tensorflow.python._pywrap_tensorflow_internal import *
     65   # This try catch logic is because there is no bazel equivalent for py_extension.

ImportError: DLL load Failed: The specified module Could not be found.

During handling of the above exception,another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-1-a7f3187573d5> in <module>
----> 1 import tensorflow as tf
      2 print (tf.__version__)
      3 import tensorflow.keras
      4 from tensorflow.keras import layers
      5 from tensorflow.keras.layers.experimental import preprocessing

~\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py in <module>
     39 import sys as _sys
     40 
---> 41 from tensorflow.python.tools import module_util as _module_util
     42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
     43 

~\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py in <module>
     38 # pylint: disable=wildcard-import,g-bad-import-order,g-import-not-at-top
     39 
---> 40 from tensorflow.python.eager import context
     41 
     42 # pylint: enable=wildcard-import

~\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\eager\context.py in <module>
     33 from tensorflow.core.protobuf import config_pb2
     34 from tensorflow.core.protobuf import rewriter_config_pb2
---> 35 from tensorflow.python import pywrap_tfe
     36 from tensorflow.python import tf2
     37 from tensorflow.python.client import pywrap_tf_session

~\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tfe.py in <module>
     26 
     27 # pylint: disable=invalid-import-order,wildcard-import,unused-import
---> 28 from tensorflow.python import pywrap_tensorflow
     29 from tensorflow.python._pywrap_tfe import *

~\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
     81 for some common reasons and solutions.  Include the entire stack trace
     82 above this error message when asking for help.""" % traceback.format_exc()
---> 83   raise ImportError(msg)
     84 
     85 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long

ImportError: Traceback (most recent call last):
  File "C:\Users\Alex\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",line 64,in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load Failed: The specified module Could not be found.'''


Failed to load the native TensorFlow runtime.

我在Google各处寻求帮助,但找不到能解决问题的任何东西。我处于我的张量流环境中,尽管我已经尝试过更新Keras,但在使用Keras之前,其他一切工作都很好。我能得到的任何建议都很棒!谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)