Merge pull request #62 from GongXinyuu/patch-1

add a missing 'dilation' argument in ReLUConvBN under POOLING
This commit is contained in:
D-X-Y 2020-04-06 21:23:08 -07:00 committed by GitHub
commit 569b9b406a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,7 @@ class POOLING(nn.Module):
if C_in == C_out: if C_in == C_out:
self.preprocess = None self.preprocess = None
else: else:
self.preprocess = ReLUConvBN(C_in, C_out, 1, 1, 0, affine, track_running_stats) self.preprocess = ReLUConvBN(C_in, C_out, 1, 1, 0, 1, affine, track_running_stats)
if mode == 'avg' : self.op = nn.AvgPool2d(3, stride=stride, padding=1, count_include_pad=False) if mode == 'avg' : self.op = nn.AvgPool2d(3, stride=stride, padding=1, count_include_pad=False)
elif mode == 'max': self.op = nn.MaxPool2d(3, stride=stride, padding=1) elif mode == 'max': self.op = nn.MaxPool2d(3, stride=stride, padding=1)
else : raise ValueError('Invalid mode={:} in POOLING'.format(mode)) else : raise ValueError('Invalid mode={:} in POOLING'.format(mode))