Small error in layer_names index (plot labels) in ungraded lab 1

In the notebook C2_W1_Lab_1_cats_vs_dogs.ipynb, after the comment:
“These are the names of the layers, so you can have them as part of our plot”

the code line that is written as:
layer_names = [layer.name for layer in model.layers]

should be written as:
layer_names = [layer.name for layer in model.layers[1:]]

Thank you.

Hi! Thank you for reporting and that’s a good catch! We revised the notebook to have this instead:

successive_outputs = [layer.output for layer in model.layers]

and we kept:

layer_names = [layer.name for layer in model.layers]


That way, you can visualize the output of all convolutions and pooling. Thanks again!

1 Like