Resnet50 Comparator Error

in the Resnet Assignment Exercise 3, after passing Exercise 1 and 2, I got an error in the following line
comparator(summary(model), ResNet50_summary)

with an error message,
Test failed
Expected value
[‘Conv2D’, (None, 2, 2, 512), 524800, ‘valid’, ‘linear’, ‘GlorotUniform’]
does not match the input value:
[‘Conv2D’, (None, 4, 4, 256), 262400, ‘valid’, ‘linear’, ‘RandomUniform’]

After looking at some posts on this site, I suspect that this may because of the ordering of the NN when adding the skip-connection layer to the model (Add()[…]). I tried to swap the ordering in the identity_block or convolutional_block, but so far it still does not work and could not pass the test. Do you have any suggestions for this?


Hi leonardoedgar,

Did you manage to resolve this? If not, could you send me your code by means of a direct message, so I can have a look?

Have you found the solution to this problem? I’m facing it too. Could you help me?


Hi salwyn13,

Yes, it was resolved by checking the number of identity_blocks in stage 4. Hope this works for you too.

1 Like

is this a common error?

This thread is four months old. Please start a new thread so the mentors can find it more easily.