maxpool layer
HonestyBrave opened this issue · 3 comments
HonestyBrave commented
Hi, motokimura,
I'm sorry, I have to ask you again, the question is about Maxpool Layer in darknet.py file of "_make_conv_layers", is about "nn.MaxPool2d(2)", the function nn.MaxPool2d(2), you didn't use the "stride" parameter, but the author paper has to stride, so i have confusion, could you give a more explain?
thank you very much!
HonestyBrave commented
motokimura commented
According to the PyTorch docs, stride
default value is kernel_size
.
This means, if stride
is not given, stride
is set to the same value as kernel_size
.
https://pytorch.org/docs/1.0.0/nn.html?highlight=maxpool2d#torch.nn.MaxPool2d
So nn.MaxPool2d(2)
is equivalent to nn.MaxPool2d(kernel_size=2, stride=2)
.
HonestyBrave commented
Very very thank you!