I am trying to run assignments on my laptop and plot_model in assignments does not work . it gives me the following error:
ImportError: cannot import name ‘wrappers’ from ‘tensorflow.python.keras.layers’ (C:\Users\pouri\anaconda3\lib\site-packages\tensorflow\python\keras\layers_init_.py)
is there any way to solve the issue ?
thanks!
Plot_model not working
You likely have a version incompatibility. Either need to match your local install to the same version running the exercise, or migrate the code to match your version. Not uncommon when running Coursera labs locally, especially classes that have been around for a while.
https://www.tensorflow.org/api_docs/python/tf/keras/utils/plot_model
I followed the instruction but I got new error regarding not having pyplot and graphviz. I installed them by !pip install command but still getting the same error. Some how it does not recognize the installation
I remember that I had the same problem, and I need to import the plot_mode from keras, and not Tensorflow.
Now I’m using without issues.
I’m importing the library from a different path that the recommended in the link above.
I’m using it:
from keras.utils.vis_utils import plot_model
But in the link they recommend:
tf.keras.utils.plot_model
But I’m using Tensorflow 2.9.2 and keras 2.9.0.
I am not sure if it will solve the problem with another versions.
I hope it can help, in any case try it is effortless