Skip to content

Commit c6393b5

Browse files
committed
modify padding in maxpool
1 parent 1ce0009 commit c6393b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model/yolov3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def set_layer(self, layer_info):
189189
elif info['type'] == 'maxpool':
190190
_pad = int(int(info['size']) - 2)
191191
if int(info['stride']) == 1:
192-
submodule = nn.Sequential(nn.ZeroPad2d((1,0,1,0)),
192+
submodule = nn.Sequential(nn.ConstantPad2d((0,1,0,1),-50),
193193
nn.MaxPool2d(kernel_size=int(info['size']), stride=int(info['stride']), padding=_pad))
194194
modules.add_module('layer_'+str(layer_idx)+'_maxpool',
195195
submodule)

0 commit comments

Comments
 (0)