You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
like the title already mentioned, using the ZeroPadding2D layer extremely slow down the inference, so we don't gain much from removing 1x1-conv and skips branches.
I found out that we only need ZeroPadding2D for 3x3 conv with stride 2 branches (halving the dimension). Meaning: you can remove most of the ZeroPadding2D layers and set padding to 'same' for those cases.
Best,
Vinh
The text was updated successfully, but these errors were encountered:
found out, that Conv2D with padding = same and stride = 2, tensorflow puts 2 new lines on the bottom and right side of the input feature map. Therfore, the perception field of 1x1 and 3x3 convolution is not the same.
You can fix the bug when converting the deploy model by padding the 1x1 to 3x3 with: padding = tf.constant([[0, 2], [0, 2], [0, 0], [0, 0]])
This way, you can drop all ZeroPadding2D layers and just use 'same'-padding of Conv2D layer.
Hi Thang,
like the title already mentioned, using the ZeroPadding2D layer extremely slow down the inference, so we don't gain much from removing 1x1-conv and skips branches.
I found out that we only need ZeroPadding2D for 3x3 conv with stride 2 branches (halving the dimension). Meaning: you can remove most of the ZeroPadding2D layers and set padding to 'same' for those cases.
Best,
Vinh
The text was updated successfully, but these errors were encountered: