ResNet assignment Week2 course 4

I’m getting an error in the convolutional_block() function which says
AssertionError*: Wrong values with training=False*

I’ve done everything in the same way which was mentioned in the instructions but still I’m facing problem with the outputs.

What could be a possible solution for this?? If anyone can help me…

Hi I got the same error.
Are you able to figure it out?
Please guide. Thanks

Hello Yashas,

I ran into the same error. Please double-check input on which Conv2D operation takes place of all paths( e.g. First, Second), especially shortcut path. And keep “training” as a variable rather than True or False.

I hope it helps you.

1 Like

I completely checked my code. I’ve done exactly the same thing which was written in the instructions. But I’m unable to figure out how am I supposed to get wrong values while training.

Can you once share your work if possible. I would like to refer that.

If previous layers are implemented correctly and the shortcut path is similar to,

X_shortcut = Conv2D(filters = F3, kernel_size = 1, strides = (s, s), padding=‘valid’, kernel_initializer = initializer(seed=0))(X_shortcut)
X_shortcut = BatchNormalization(axis = 3)(X_shortcut, training=training)

then it should work.