C4_W3_Assignment | Unet | Segmentation | Ambigious explanations and hints in coding block unet_model

in def unet_model there seems to be quite a lot of ambiguities regarding the explanations and hints:

  • expanding path (decoding) here is the explanation:
    Note that you must use the second element of the contractive block before the max pooling layer.
    We have the same hint in coding block: # Note that you must use the second element of the contractive block i.e before the maxpooling layer. I thought we only employ max pooling in expanding block, i.e., decoding!
    Where exactly is the max pooling layer in upsampling path? Is it confusing for all or am I missing something?!

  • after cblock1 = conv_block(inputs, n_filters), there is this hint: # Double the number of filters at each new step. if we follow this hint pattern, I believe we should end up with 16*n_filters for cblock5 and accordingly we start with 16*n_filters in ublock6and NOT 8*n_filters as given in the explanation text!

  • in upsampling block, it would have been nice to provide a hint in which we should follow ublockX as expansive_input and cblockY as contractive_inputstarting from ublock7 to avoid error for tensor size.

Cheers,

Hello @mrgransky,

Let’s go through your points one by one.

Note that you must use the second element of the contractive block i.e before the maxpooling layer

Let me emphasize that we are talking about the 2nd element of the CONTRACTIVE BLOCK, and that element is an input to the MaxPooling Layer (if enabled) in a contractive block, so we said “it is before the maxpooling layer”. This is NOT saying that there is any MaxPooling Layer in the upsampling path.

I think you are referring to this line. Please correct me if I am wrong.

This line is under “For the second half”, so it has nothing to do with the cblock5 which should fall under the “first half”. The highlighted instruction talks about what parameters to pass into upsampling_block(...).

Cheers,
Raymond