I also get this error for all of the labs where it trys to show images of how the convolutions work.
If i uninstall Tensorflow and reinstall an old version it works, but obviously is not very efficient and it would be useful to know what the equivalent code is in the new Tensorflow.
I tried running all the lines of code in a single cell and still continued to get the error. Each run the error differs i.e. first run, error is layer sequential_1, 2dn run, layer sequential_4 etc.
I am sharing a very well explained post related to recalling sequential layers, I don’t if it’s related to this, but surely will help you understand how one needs to recall codes related to sequential and functional api
This is expected behavior if you are not explicitly naming layers in your code. In the absence of a name=‘my_layer_name_here’ parameter, layer names will be generated using the layer type appended with underscore plus the integer count of that type of layer.
I believe if you restart the collab
Session from scratch the numbers will restart at _1 so I wouldn’t spend time debugging there.
I haven’t looked at this exercise in several years and don’t have access to a current notebook, but just from the symptom described it does seem related to how the model input shape is being used.
I just ran on Colab and got the same reported error. I added print statements and see that the versions running in my env are:
TensorFlow: 2.17.0
Keras : 3.4.1
I do think there is a difference in how input and input shape is handled in Keras 3.x Model, but am not an expert on the change and am not an active Mentor for these courses any longer. Perhaps someone who is can join the thread.
Hi! This is indeed a problem with TF2.17 using Keras 3 by default. We’ve updated the notebook to pin to TF2.15 . Kindly re-launch the notebook from your classroom to see the changes. Thank you!
Confirmed that the visualization cell runs without error for me, though I did get this report during the package loading step…
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorstore 0.1.64 requires ml-dtypes>=0.3.1, but you have ml-dtypes 0.2.0 which is incompatible.
Hi Nomen! Glad it works now. Those errors during the pip install are expected because of bundled packages with Colab. It shouldn’t affect those that are needed in this lab so I don’t think we should resolve them. Thanks!