I dont understand in the FCN8 encoder function. I have obtained the expected output but I donot understand why layer 4 and layer 5 have the same number of filters that is 256 in both shouldnt it be 256 for layer 4 and 512 for layer 5. Reference : Exercise 2 of Graded Assignment. Your response will be appreciated
As you know where the block 4 and 5 we use filter of 256, this section uses a defined encoder conv block (which was defined from the previous most grader cell in which there are 2 conv2d layers with 2 leaky rela and one max pool with batch normalisation with a default stride of 2 to be used). So the conv block is used for each block which will result in output of 1024, which then gets reduce to half in the encoder cell as you see in the decoder cell, the filter size used is 512.
So if we use 512 filter for block 5 while defining the downsampling path, it will not wrong output shape for the decoder fcn8. Hence the block 4 and block 5 used the same filter size of 256 to get the desired output shape for upsampling path in the decoder cell.