Please provide the entire URL of the model you are using?
Describe the current behavior
Getting Error while import from tensorflow.python.keras.saving.save import export_saved_model
Error 👍 cannot import name 'export_saved_model
Tensorflow 2.2 version
Describe the expected behavior
Code to reproduce the issue
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.python.keras.saving.hdf5_format import load_attributes_from_hdf5_group
from tensorflow.python.keras.saving.hdf5_format import load_model_from_hdf5
from tensorflow.python.keras.saving.hdf5_format import load_weights_from_hdf5_group
from tensorflow.python.keras.saving.hdf5_format import load_weights_from_hdf5_group_by_name
from tensorflow.python.keras.saving.hdf5_format import preprocess_weights_for_loading
from tensorflow.python.keras.saving.hdf5_format import save_attributes_to_hdf5_group
from tensorflow.python.keras.saving.hdf5_format import save_model_to_hdf5
from tensorflow.python.keras.saving.hdf5_format import save_weights_to_hdf5_group
from tensorflow.python.keras.saving.model_config import model_from_config
from tensorflow.python.keras.saving.model_config import model_from_json
from tensorflow.python.keras.saving.model_config import model_from_yaml
from tensorflow.python.keras.saving.save import load_model
from tensorflow.python.keras.saving.save import save_model
from tensorflow.python.keras.saving.save import export_saved_model
from tensorflow.python.keras.saving.saved_model import load_from_saved_model
from tensorflow.python.keras.saving.saving_utils import trace_model_call
Other info / logs
export_saved_model under keras is tensorflow.compat.v1.keras.experimental.export_saved_model and it's deprecated. You can try use it or use
model.save(..., save_format="tf") or `tf.keras.models.save_model(..., save_format="tf")
Im getting the following error after installing tensorflow and trying to import it:
import tensorflow as tf
Error:
ImportError: cannot import name 'export_saved_model' from 'tensorflow.python.keras.saving.saved_model'
I had the same problem
I cleared my output and restarted my kernel, then ran
!pip uninstall -y tensorflow
!pip install tensorflow
and the error went away. 'tensorflow.python.keras.saving.saved_model' has been depreciated, so I think there were remnants in my kernel, thus the need to restart.
I actually am currently facing the exact same problem.
import tensorflow as tf
Error:
ImportError: cannot import name 'export_saved_model' from 'tensorflow.python.keras.saving.saved_model'
I have also tried @kari0219 's suggestion and also tried doing that with conda uninstall -y tensorflow
However, I am still getting the same error. Any other suggestions?
I am using Jupyter notebook to run code (if that makes a difference)
Ok i fixed it.... by going into the directory and deleting all items related to tensorflow....
might have broken something else but it seems to work now. It seems that even after clearing and uninstalling, the problematic files remained...
@kari0219 thanks
i have the same problem but finally, it got solved by installing tensorflow again and restarting the kernel...
It happend to me... also...
Please, I installed tensorflow using conda install tensorflow
After installing it I go a Collerboerror and I tried importing it and I am getting another error
ImportError:cannot import name 'export_saved_modrl' from 'tensorflow.python.keras.saving.saved_model
Please, I installed tensorflow using
conda install tensorflow
After installing it I go aCollerboerrorand I tried importing it and I am getting another error
ImportError:cannot import name 'export_saved_modrl' from 'tensorflow.python.keras.saving.saved_model
Hey @Ndohjapan , maybe you wrote export_saved_model wrong... i see in your comment 'export_saved_modrl'
Thanks a million.
I am just a beginner in this object detection of a thing and this
tensorflow is stressing me out.
Please for how long have you been into this trade of IT.
On Sat, Sep 19, 2020 at 4:03 PM Kleiser notifications@github.com wrote:
Please, I installed tensorflow using conda install tensorflow
After installing it I go a Collerboerror and I tried importing it and I
am getting another error
ImportError:cannot import name 'export_saved_modrl' from
'tensorflow.python.keras.saving.saved_modelHey @Ndohjapan https://github.com/Ndohjapan , maybe you wrote
export_saved_model wrong... i see in your comment 'export_saved_modrl'—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/models/issues/8450#issuecomment-695234236,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJXLKVMV35K4ZJQZVLZ6AALSGTB2PANCNFSM4MS4DQYQ
.
Most helpful comment
I had the same problem
I cleared my output and restarted my kernel, then ran
and the error went away. 'tensorflow.python.keras.saving.saved_model' has been depreciated, so I think there were remnants in my kernel, thus the need to restart.