Course 4 Week 2 Assignment 1 Error in convolutional_block

Hi there,

I’m having the following error.

AssertionError: Wrong values when training=True.

In my code, I pass to the CONV2D and the BatchNorm layers the variable (X_shortcut) In the shortcut path instead of (X). Even though I also tried passing X.

I already read this thread:

Thank you for your help!

Did you read Mubsi comment on the post I have helped. it is an updated assignment. Can you DM me your notebook. Click on my name, and then message.

I suggest comparing your code with the instructions. It is normal to make mistakes on the first attempt but rereading the instructions carefully will help.

Check your kernel_initializer codes are correct or not based on the instruction given above the grader cell, have recalled it with the right function in the convolution_block

We have added the initializer argument to our functions. This parameter receives an initializer function like the ones included in the package tensorflow.keras.initializers or any other custom initializer. By default it will be set to glorot_uniform

Having the same error. Just checking here so i can follow up with the solution.

When I checked the before learner file, he had issue with the identity block too. Actually the code are pretty simple and you need to follow the instructions give just before the grader cell. I will share the image for both identity block and convolution block. See that you have followed both the grader cell according to the instructions. Note in the upgraded lab you do not need to use training as it is passed randomly

Also make sure you run cell from cell #1 one by one

identity block instructions :point_down:

Convolutional block instructions :point_down:

In case you are still not able to get the issue resolved, send the notebook via personal DM