d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
23.92k stars 4.36k forks source link

adaptation inconsistency: wrong output in maxpool #1270

Closed astonzhang closed 3 years ago

astonzhang commented 4 years ago

http://preview.d2l.ai.s3-website-us-west-2.amazonaws.com/d2l-en/master/chapter_convolutional-neural-networks/pooling.html

mxnet

pool2d = nn.MaxPool2D((2, 3), padding=(1, 2), strides=(2, 3)) pool2d(X) Copy to clipboard array([[[[ 0., 3.], [ 8., 11.], [12., 15.]]]])

pt

pool2d = nn.MaxPool2d((2, 3), padding=(1, 1), stride=(2, 3)) pool2d(X) Copy to clipboard tensor([[[[ 1., 3.], [ 9., 11.], [13., 15.]]]])

merajhashemi commented 4 years ago

pytorch: pool2d = nn.MaxPool2d((2, 2), padding=(1, 1), stride=(2,3))