Quiz - Week 1 - Incorrect Answer Marked as correct

Hi,

I am not sure how is that the correct answer. Don’t we have to solve for P?

Hi @Moutasem_Akkad,

Thanks for pointing this out. The explanation given after grading is not matching the problem (where does the 121 come from?), and we do need to solve for p as you ask, using the formula n_H = (n_H + 2p -f )/s + 1.

We want to keep the n_H of 64 after the convolution. Therefore, we can solve for p as follows, with n_H=64, f=9, s=1:

64 = (64+2p-9)/1 + 1
0 = 2p-8
p = 4

So the padding size of 4 is correct.

It turns out that, as long as the stride s is 1, the value of n_H (be it 64 or 121) does not matter in solving for p, as it gets cancelled out anyway.

1 Like

Thanks, one more suggestion. I have noticed that some of the notes (corrections) about certain lectures come after the lecture. Might be helpful to have them before the lectures.