Skip to content

Same padding, different results. #561

Answered by marcvanzee
rolandgvc asked this question in Q&A
Discussion options

You must be logged in to vote

SAME pads so the input and output shape are the same. Given that 100 - 33*3 = 1, it only pads 1 after each spatial dimension. Right now your padding mask in b pads one before and one after, so I think it is doing too much padding.

>>> b2 = nn.max_pool(x, (3, 3), strides=(2, 2), padding=[(0, 1),(0, 1)])
>>> print(np.mean(np.abs(a - b2)))
0.0

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@avital
Comment options

@rolandgvc
Comment options

Answer selected by avital
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants