微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决使用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 举报,一经查实,本站将立刻删除。