Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4d95602

Browse files
static padding fixed
1 parent 2eb7a7d commit 4d95602

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎efficientnet_pytorch/utils.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ def __init__(self, in_channels, out_channels, kernel_size, stride=1, image_size=
262262
pad_h = max((oh - 1) * self.stride[0] + (kh - 1) * self.dilation[0] + 1 - ih, 0)
263263
pad_w = max((ow - 1) * self.stride[1] + (kw - 1) * self.dilation[1] + 1 - iw, 0)
264264
if pad_h > 0 or pad_w > 0:
265-
self.static_padding = nn.ZeroPad2d((pad_w // 2, pad_w - pad_w // 2, pad_h // 2, pad_h - pad_h // 2))
265+
self.static_padding = nn.ZeroPad2d((pad_w - pad_w // 2, pad_w - pad_w // 2,
266+
pad_h - pad_h // 2, pad_h - pad_h // 2))
266267
else:
267268
self.static_padding = Identity()
268269

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /