From the architecture table of the first MobileNet paper, a depthwise convolution with stride 2 and an input of 7x7x1024 is followed by a pointwise convolution with the same input dimensions, 7x7x1024.

Shouldn't the pointwise layer's input be 4x4x1024 if the depthwise conv. layer was stride 2? (Assumming padding of 1)

Is this an error on the author's side? Or are there something that I've missed between these layers? I've checked implementations of MobileNet V1 and it seems that everyone just treated this depthwise layer's stride as 1.

enter image description here

  • $\begingroup$ It depends if there is zero padding or not. There was probably some padding. $\endgroup$
    – Brale
    Feb 14 at 10:19
  • $\begingroup$ @Brale from the source code it seems that the padding is always of form valid - github.com/tensorflow/models/blob/master/research/slim/nets/… $\endgroup$ Feb 15 at 10:23
  • $\begingroup$ @spiridon_the_sun_rotator I see. Then I assume there would be padding of 4 on each side, making the input at least 15x15. This does mean that roughly 30% of output values are zeros... I don't think I understand why they would have made such design choice. $\endgroup$ Feb 15 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.