If you like ascii art:
"VALID" = without padding:
inputs: 1 2 3 4 5 6 7 8 9 10 11 (12 13)
|______________| dropped
|_______________|
"SAME" = with zero padding:
inputs: 0 |1 2 3 4 5 6 7 8 9 10 11 12 13| 0 0
|______________|
|_______________|
|______________|
In this example:
Input width = 13
Filter width = 6
Stride = 5
Notes:
"VALID" only ever drops the right-most columns (or bottom-most rows).
"SAME" tries to pad evenly left and right, but if the amount of columns to be added is odd, it will add the extra column to the right, as is the case in this example (the same logic applies vertically: there may be an extra row of zeros at the bottom).
参考:https://stackoverflow.com/questions/37674306/
转载自:https://www.cnblogs.com/bonelee/p/8532708.html
其他资料:https://zhuanlan.zhihu.com/p/62760780