d2l-pytorch icon indicating copy to clipboard operation
d2l-pytorch copied to clipboard

[possible typo] AdaptiveAvgPool2d or AdaptiveMaxPool2d in NiN?

Open Fengyee opened this issue 4 years ago • 1 comments

in Ch09_Modern_Convolutional_Networks/Network_in_Network(NiN).ipynb defines the NiN net model with:

    #Global Average Pooling can be achieved by AdaptiveMaxPool2d with output size = (1,1)
    self.avg1 = nn.AdaptiveMaxPool2d((1,1))

Is it a typo of nn.AdaptiveAvgPool2d or some deeper reasons behind this? Cause using Avg will train a lot slower and get bad train/val accuracy like 0.460 (epoch 5)

Fengyee avatar Mar 02 '20 08:03 Fengyee

Yes, that's a typo in the notebook. Thanks for pointing it out. Would you like to send in a PR fixing it and updating the results after running the notebook?

AnirudhDagar avatar May 15 '20 23:05 AnirudhDagar