C4_W2_Assig2_Ex2. two errors

C4_W2_Assig2_Ex2. 2 errors.


I get two errors that I cannot understand. This is the first:

I tried to enter the shape (160, 160, 3) in different ways but the error did not change. Where can be the origin of the error.

Anyway, the model is compiled and run and then a second error appears:

Again, I don’t understand it; why this logits structure of (2, 2, 1) when the last Dense layers has one only unit?

Many thanks for a hint that allow me to guess where the errors are.


Did you modify the code in the cell where “alpaca_summary = …” is defined?

You should not modify that cell.

Hi @TMosh

I was going to answer: “Oh no, I don’t think so” . But I checked it’s aspect and yes, I found that there was this strange “IMG_SHAPE”. :

Probably I dropped it inadvertently when I was copying this text from one place to another.
Removing it I got the nice “All tests passed”.

Many thanks for your hint.