Programming Assignment Residual Networks

I have problem in Programming Assignment Residual Network. In codding

{Moderator Edit: Solution Code Removed}

I got mistake AssertionError: Wrong values when training=False.

Please avoid sharing your code as it is not allowed.

Regarding your error, what should be the input for the SHORTCUT PATH?
Hint: It is not X but the same as used to store the output of the shortcut path.

I do apologize…
Thank You a lot…I lost too much time…

1 Like

Hello!
I am sorry for the burden.
I have the same error. I have read all comments and hints in related posts. I am pretty sure understand the problem and tips from mentors, however ironically I still cannot fix the bug in my code.

In the shortcut path I have:

SHORTCUT PATH ##### (ā‰ˆ2 lines)
X_shortcut = Conv2D(<<<parameters from the assignment>>>)(X_shortcut)
X_shortcut = BatchNormalization(<<<parameters from the assignment>>>)(X_shortcut, training=training)

then:

X = Add()([X, X_shortcut])
X = Activation('relu')(X)

what is wrong?

What are the parameters from the assignment?

{Moderator Edit: Solution Code Removed}

Please send me your complete code of convolutional_block function in a private message. Click my name and message. And, avoid sharing your code in a public thread.

Please read this, from notebook:

Second component of main path:

  • The second CONV2D has F2 filters of shape (f,f) and a stride of (1,1). Its padding is ā€œsameā€. Use 0 as the glorot_uniform seed kernel_initializer = initializer(seed=0).

What is padding?

OMG!
I looked at these sentences dozens of times and didn’t notice this error.
Thank you @saifkhanengr for the patience and help!

This forum is really helpful. Thanks :slight_smile:

1 Like