Week 2 Convolutional Block

I keep getting this error message whenever I run my code, and it doesn’t tell me which line the error is on. I suspect that it has to do with the shortcut path, but I checked its CONV2D layer and it looks good.

It is telling you that the output value produced by your convolutional_block is the wrong shape, but you didn’t get any actual errors thrown during the execution of the function. So your logic is self-consistent, but somehow the final resultant shape is wrong. Anytime you get a shape error, the first thing to do is print the shape. What shape is it? Then that should give you some clue or at least a starting point to work backwards and figure out where things went off the rails. You can see from the test case what shape they expected with the given inputs.

Thank you! I switched the strides of the third component and main path. The issue is fixed.