Week 2, Programming assignment #1 Function: convolutional_block

Can somebody please help me with what exactly I am doing wrong? I trying to debug this for a long time and I have hit a deadend.

{moderator edit - solution code removed}

The error it’s showing me:

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.
Please help.

Please don’t post your code on the Forums. If a mentor needs to see your code, we’ll ask you to send it to us.

In the shortcut path, you’re using X as an argument. That should be X_shortcut.

1 Like