nn.MaxPool2d 神奇的默认值

import torch.nn as nn

if __name__ == '__main__':
    a = nn.MaxPool2d(kernel_size=1)
    print(a)
    b = nn.MaxPool2d(kernel_size=2)
    print(b)
    c = nn.MaxPool2d(kernel_size=3)
    print(c)
MaxPool2d(kernel_size=1, stride=1, padding=0, dilation=1, ceil_mode=False)
MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
MaxPool2d(kernel_size=3, stride=3, padding=0, dilation=1, ceil_mode=False)
文章目录