I keep getting this error when importing tensorflow as tf with the below error text:
ImportError: cannot import name 'export_saved_model' from 'tensorflow.python.keras.saving.saved_model'
Code used is simply:
import tensorflow as tf
I have done:
Code used for tensorflow unstallation:
pip uninstall tensorflow
or conda uninstall -y tensorflow
Code used for tensorflow installation:
pip install tensorflow
or conda install tensorflow
I can't seem to figure why it keeps saying:
"ImportError: cannot import name 'export_saved_model' from 'tensorflow.python.keras.saving.saved_model'"
Uninstalling and install again worked for me.
conda activate tf
pip uninstall -y tensorflow-gpu
pip install tensorflow-gpu
However, am still looking for the cause of this error. It was working just a few minutes ago but suddenly I have faced this error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With