Week 3 - assignment 2 - exercise 3 - Test failed does not match the input value

Hi, I have a problem with combining the U-net model and I dont know why. I passed all the test for functions before so I think they should be okay.

For the first conv_block I used inputs and n_filters, for second block I used the first element ([0]) of the block 1 and n_filters, for the third block first element of the block 2 and 2n_filters and so on. For the 4th block I added dropout_prob 0.3 ( here is 4n_filters) . the 5th block has dropout_prob, 8filters and max_pooling false. ublock6 is programmed as requested and for other ublocks I use the output of the previous ublock as expansive input and second element ([1]) of the corresponding contractive block output (ublock7 = upsampling_block(ublock6, cblock3[1],4n_filters)). the 9th layer is already stated and the 10th is Conv2D(n_classes, 1, padding=‘same’)(conv9)

I have no idea what could be wrong I tried to change the multiplication of n_filters so that there would be 2*filters in 2nd conv_block and the same with ublocks but I still get the error

Test failed
Expected value

[‘Conv2D’, (None, 48, 64, 64), 18496, ‘same’, ‘relu’, ‘HeNormal’]

does not match the input value:

[‘Conv2D’, (None, 48, 64, 32), 9248, ‘same’, ‘relu’, ‘HeNormal’]

Can you please help me what could be wrong? Thank you.

1 Like

Please try on the latest version of the lab notebook.
Should you still face issues, click my name and message your notebook as an attachment.

Hi there, I have the same problem as you did back then. Did you manage to do anything to solve it? I have not hard-coded my filter numbers or anything else. :frowning: I don’t know what I’m missing here.

Test failed
Expected value

[‘Conv2D’, (None, 48, 64, 64), 18496, ‘same’, ‘relu’, ‘HeNormal’]

does not match the input value:

[‘Conv2D’, (None, 48, 64, 32), 9248, ‘same’, ‘relu’, ‘HeNormal’]

Please click my name and message your notebook as an attachment.

@alireza-na77 Here are some hints:

  1. In encoding path, when asked to double the number of filters at each new step, don’t start doubling by a multiplicative factor of 1. Start with 2 instead.
  2. The number of filters in the last Conv2D layer is wrong. Please read the comment above the code.

Cheers.

Hello…
I am facing a similar problem as the above learner.
I have checked the above suggestions and have not found any inconsistency as such.
Kindly could you direct me to the right approach.
Test failed
Expected value

[‘Conv2D’, (None, 12, 16, 256), 295168, ‘same’, ‘relu’, ‘HeNormal’]

does not match the input value:

[‘Conv2D’, (None, 12, 16, 192), 221376, ‘same’, ‘relu’, ‘HeNormal’]