Week 2 Assignment 1 Exercise 2 Convolutional block

Hello! I’m getting AssertionError: Wrong values when training=False for the third assert even though I pass X_shortcut both to Conv2D and BatchNormalization in the final step. Main path is also implemented exactly as described in the task. I checked similar threads, but it seems that the main problem was passing X instead of X_shortcut.
What could be the problem here?

Hi there, for the main path, I think we need to pass X instead of X_shortcut. For the shortcut path, we need to pass X_shortcut. Please also make sure you perform BatchNorm on the correct axis.
Hope it help.

Hi! I pass X for the main path and X_shortcut for the shortcut path. In BatchNorm I have axis=3 everywhere :c

That sounds correct. I wonder what happened that makes it wrong. Can you send me your code through a message so we can see what’s going on?

My bad, I misread the stride dimensions for the 2nd and the 3rd component… had (s,s) instead of (1,1)