W1A2 assignment issue with code in Ex 2 test cell

The code in the test cell for Exercise 2 is failing because it appears that a string from the instructions has been pasted in there. It begins:

**tf.keras.layers.Conv2D(filters= … , kernel_size= … , padding=‘same’)(input_img)**conv_model = convolutional_model((64, 64, 3))

where the bolded section shouldn’t be there and prevents the cell from properly executing. The user cannot correct it. So I can’t get past this cell without it being corrected.


Interesting. But that cell is immutable, so how did it get changed? Did you use any external tools on the notebook other than just running it on the course website?

But regardless of how the error occurred, the first thing to try to remedy it would be to get a clean copy of the notebook and then carefully “copy/paste” over any completed work from the damaged notebook. There is a topic about how to do that on the DLS FAQ Thread.

Hi - Thanks for the reply. I did not use any external tools on the notebook. I have already attempted to download a clean version but that didn’t help. (I have made a copy of my assignment so that it could be used to refill responses). I will try that again and report back here if it fails or succeeds.

FWIW I just went through the exercise of getting a clean copy of that notebook and do not see the damage that you are seeing. So something very odd is happening. Are you sure you moved your notebook out of the way first before doing the “clean copy” procedure? As clearly documented in the FAQ Topic, the “Get Latest Version” only replaces missing files to avoid overwriting any of your work.

The point is making a copy of your work is not enough: you actually need to rename the file to get it out of the way.

Thank you for checking on the state of the lab. Okay - I had renamed the lab to get it out of the way.

I downloaded a clean version of the lab but had not stopped the same version and selected the clean version. Now I have been able to do so. So considered this solved and thanks for your help!

Ah, that makes sense. Yes, you need to open both of them in parallel in separate browser tabs in order to do the “copy/paste”.

Of course we still haven’t explained the original damage, but maybe that is not worth the time. Just hope you don’t see any more instances of that …

Hi Paul - I have no idea how the damage got created - I was certainly unable to un-damage it since it was locked! In any case, if I ever encounter such behavior again, I will certainly review actions taken just beforehand. Again - thanks for your assistance!