AssertionError: Wrong values when training=False

I am getting below error when running week2, assignment 1

AssertionError Traceback (most recent call last)
12 assert type(A) == EagerTensor, “Use only tensorflow and keras functions”
13 assert tuple(tf.shape(A).numpy()) == (3, 2, 2, 6), “Wrong shape.”
—> 14 assert np.allclose(A.numpy(), convolutional_block_output1), “Wrong values when training=False.”
15 print(A[0])

AssertionError: Wrong values when training=False.

Kindly help to resolve this issue

Solved the issue. Thanks :slightly_smiling_face:

Glad to hear that you found the solution under your own power! I was going to suggest checking the “shortcut” path, as that’s the most common error here.

Yes it was due to the “shortcut” path as you mentioned. Thanks :slight_smile:


can you please help me in this

We can try. Have you read the earlier posts on this thread? Have you checked your inputs on the “shortcut” path? They should not be X, right? Also check that you BatchNorm layers look exactly the same as the sample one that they gave you in the template code.

yes i wasn’t looking at shortcut path thanks i figured it out