pading from (k-1) // 2 to k // 2
This commit is contained in:
parent
b574f765ce
commit
a34219a54b
|
@ -28,7 +28,7 @@ def create_modules(module_defs, img_size):
|
||||||
out_channels=filters,
|
out_channels=filters,
|
||||||
kernel_size=size,
|
kernel_size=size,
|
||||||
stride=stride,
|
stride=stride,
|
||||||
padding=(size - 1) // 2 if mdef['pad'] else 0,
|
padding=size // 2 if mdef['pad'] else 0,
|
||||||
groups=mdef['groups'] if 'groups' in mdef else 1,
|
groups=mdef['groups'] if 'groups' in mdef else 1,
|
||||||
bias=not bn))
|
bias=not bn))
|
||||||
else: # multiple-size conv
|
else: # multiple-size conv
|
||||||
|
|
|
@ -65,7 +65,7 @@ class MixConv2d(nn.Module): # MixConv: Mixed Depthwise Convolutional Kernels ht
|
||||||
out_channels=ch[g],
|
out_channels=ch[g],
|
||||||
kernel_size=k[g],
|
kernel_size=k[g],
|
||||||
stride=stride,
|
stride=stride,
|
||||||
padding=(k[g] - 1) // 2, # 'same' pad
|
padding=k[g] // 2, # 'same' pad
|
||||||
dilation=dilation,
|
dilation=dilation,
|
||||||
bias=bias) for g in range(groups)])
|
bias=bias) for g in range(groups)])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue