Why does this error come up?

I think I’ve done all the things correctly but still get errors when I write the code from scratch by myself.

Please provide more information.
Which week and assignment and function are you working on?

Assignment 2
Transform Learning with MobileNetV2
I just wrote code by myself from scratch and got this error I follow all the guidline

Are you using Lambda anywhere? That is not necessary.

No sir.
I’ve just follow the guidlines and comments
When I copy that code to my jupyter that works but whenever I tried to do by myself from scratch this error will come up.

If you are running your notebook in some different environment than the course website, you have to be very careful: versions of packages change rapidly in this space and there is no guarantee that things will just work with whatever versions you happen to have in your environment.

I added a print statement to that notebook to figure out what version of TF is being used in the course environment. Here’s what I get:


Here’s a thread put together by a fellow student which shows how to duplicate the course environment, although I’m not sure whether those instructions cover different versions of TensorFlow.

Sure dear Paulin.
Thank you :pray: :pray: :pray: