Import Error: cannot import name ‘export_saved_model
Using TensorFlow backend.
D:\Anaconda install\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
D:\Anaconda install\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
D:\Anaconda install\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
D:\Anaconda install\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
D:\Anaconda install\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
D:\Anaconda install\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
File "<ipython-input-3-1b08a8769e32>", line 1, in <module>
from keras.models import Sequential
File "D:\Anaconda install\lib\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "D:\Anaconda install\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
from . import conv_utils
File "D:\Anaconda install\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>
from .. import backend as K
File "D:\Anaconda install\lib\site-packages\keras\backend\__init__.py", line 1, in <module>
from .load_backend import epsilon
File "D:\Anaconda install\lib\site-packages\keras\backend\load_backend.py", line 90, in <module>
from .tensorflow_backend import *
File "D:\Anaconda install\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>
import tensorflow as tf
File "D:\Anaconda install\lib\site-packages\tensorflow\__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "D:\Anaconda install\lib\site-packages\tensorflow\python\__init__.py", line 83, in <module>
from tensorflow.python import keras
File "D:\Anaconda install\lib\site-packages\tensorflow\python\keras\__init__.py", line 26, in <module>
from tensorflow.python.keras import activations
File "D:\Anaconda install\lib\site-packages\tensorflow\python\keras\activations.py", line 24, in <module>
from tensorflow.python.keras.utils.generic_utils import deserialize_keras_object
File "D:\Anaconda install\lib\site-packages\tensorflow\python\keras\utils\__init__.py", line 39, in <module>
from tensorflow.python.keras.utils.multi_gpu_utils import multi_gpu_model
File "D:\Anaconda install\lib\site-packages\tensorflow\python\keras\utils\multi_gpu_utils.py", line 22, in <module>
from tensorflow.python.keras.engine.training import Model
File "D:\Anaconda install\lib\site-packages\tensorflow\python\keras\engine\training.py", line 40, in <module>
from tensorflow.python.keras.engine import network
File "D:\Anaconda install\lib\site-packages\tensorflow\python\keras\engine\network.py", line 39, in <module>
from tensorflow.python.keras import saving
File "D:\Anaconda install\lib\site-packages\tensorflow\python\keras\saving\__init__.py", line 33, in <module>
from tensorflow.python.keras.saving.saved_model import export_saved_model
ImportError: cannot import name 'export_saved_model' from 'tensorflow.python.keras.saving.saved_model' (D:\Anaconda install\lib\site-packages\tensorflow\python\keras\saving\saved_model\__init__.py)
Try to reinstall tensorflow
pip uninstall -y tensorflow
pip install tensorflow
相關文章
- ImportError: cannot import name parseImportError
- cannot import name '_psutil_linux'ImportLinux
- importError: cannot import name 'izip_longest'ImportError
- cannot import name ‘multiarray‘ from ‘numpy.core‘Import
- ImportError: cannot import name ‘audio_ops‘ (TensorFlow)ImportError
- ImportError: cannot import name ‘BaseQuery‘ from ‘flask_sqlalchemy‘ImportErrorFlaskSQL
- ImportError: cannot import name ‘imresize‘解決辦法ImportError
- 解決 ImportError: cannot import name 'imread' from 'scipy.misc'ImportError
- ImportError: cannot import name 'get_ora_doc' from partially initialized moduleImportErrorZed
- 【Linux+Python】叢集、ssh、python、import errorLinuxPythonImportError
- require()、import、import()有哪些區別?UIImport
- Python import相關內容區別介紹( import *** as 、from***import )PythonImport
- SCSS @importCSSImport
- CSS @importCSSImport
- export/importExportImport
- 使用新版flask-script時報錯No module named flask._compat和cannot import name ‘_request_ctx_stack‘ from ‘flask‘FlaskImport
- eslint-plugin-import 規則之 Import / OrderEsLintPluginImport
- 徹底搞懂Python 中的 import 與 from importPythonImport
- @import註解Import
- idea import配置IdeaImport
- vite css importViteCSSImport
- python基礎--自定義模組、import、from......import......PythonImport
- link和@import引入css 區別,不建議使用@importImportCSS
- openGauss lo_importImport
- from bson import ObjectIdImportObject
- from selenium import webdriverImportWeb
- pycharm import 報錯PyCharmImport
- Python Package Import 之痛PythonPackageImport
- 重構smart-importImport
- China Tightens Recycling Import RulesImport
- nodejs中 import 與 asyncNodeJSImport
- require 和 import 詳解UIImport
- Python __import__() 函式PythonImport函式
- import,export的支援[nodejs]ImportExportNodeJS
- python from import 出錯PythonImport
- Spring註解之@ImportSpringImport
- 關於 Python 的 importPythonImport
- 【解決方法】vscode import cv2報錯Import "cv2" could not be resolvedPylancereportMissingImportsVSCodeImport