C4_W1 Assignment Question

The last block reported an error:

ValueError: No such layer: conv2d_88. Existing layers are: ['input_2', 'conv2d_94', 'batch_normalization_94', 'activation_94', 'conv2d_95', 'batch_normalization_95', 'activation_95', 'conv2d_96', 'batch_normalization_96', 'activation_96', 'max_pooling2d_4', 'conv2d_97', 'batch_normalization_97', 'activation_97', 'conv2d_98', 'batch_normalization_98', 'activation_98', 'max_pooling2d_5', 'conv2d_102', 'batch_normalization_102', 'activation_102', 'conv2d_100', 'conv2d_103', 'batch_normalization_100', 'batch_normalization_103', 'activation_100', 'activation_103', 'average_pooling2d_9', 'conv2d_99', 'conv2d_101', 'conv2d_104', 'conv2d_105', 'batch_normalization_99', 'batch_normalization_101', 'batch_normalization_104', 'batch_normalization_105', 'activation_99', 'activation_101', 'activation_104', 'activation_105', 'mixed0', 'conv2d_109', 'batch_normalization_109', 'activation_109', 'conv2d_107', 'conv2d_110', 'batch_normalization_107', 'batch_normalization_110', 'activation_107', 'activation_110', 'average_pooling2d_10', 'conv2d_106', 'conv2d_108', 'conv2d_111', 'conv2d_112', 'batch_normalization_106', 'batch_normalization_108', 'batch_normalization_111', 'batch_normalization_112', 'activation_106', 'activation_108', 'activation_111', 'activation_112', 'mixed1', 'conv2d_116', 'batch_normalization_116', 'activation_116', 'conv2d_114', 'conv2d_117', 'batch_normalization_114', 'batch_normalization_117', 'activation_114', 'activation_117', 'average_pooling2d_11', 'conv2...

I don’t what makes the conv2d index starts from such big number 94. Please tell me where should I find the code error. Thank you.

I found that I created a new inception model in the function get_style_image_features and get_content_image_features and forgot to use the ‘inception’ which already created in the former block. Perhaps the hint misled me to build a new inception model. After correction the code could work. Question solved.

1 Like