From 61bada7293f44ddb24816c42c6ee12a38fb8e2c1 Mon Sep 17 00:00:00 2001 From: zhiqiang Date: Thu, 29 Apr 2021 01:54:55 +0800 Subject: [PATCH 1/2] Keep consistency of ConvBNActivation --- torchvision/models/mobilenetv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchvision/models/mobilenetv2.py b/torchvision/models/mobilenetv2.py index 386513b4071..b641bf0c6fe 100644 --- a/torchvision/models/mobilenetv2.py +++ b/torchvision/models/mobilenetv2.py @@ -46,7 +46,7 @@ def __init__( norm_layer = nn.BatchNorm2d if activation_layer is None: activation_layer = nn.ReLU6 - super(ConvBNReLU, self).__init__( + super(ConvBNActivation, self).__init__( nn.Conv2d(in_planes, out_planes, kernel_size, stride, padding, dilation=dilation, groups=groups, bias=False), norm_layer(out_planes), From 5e0ad19d034909b3d5ff5c6d65d244bc3542c9e2 Mon Sep 17 00:00:00 2001 From: Zhiqiang Wang Date: Thu, 29 Apr 2021 02:15:29 +0800 Subject: [PATCH 2/2] Simplify using the Python3 idiom Co-authored-by: Vasilis Vryniotis --- torchvision/models/mobilenetv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchvision/models/mobilenetv2.py b/torchvision/models/mobilenetv2.py index b641bf0c6fe..3938156949f 100644 --- a/torchvision/models/mobilenetv2.py +++ b/torchvision/models/mobilenetv2.py @@ -46,7 +46,7 @@ def __init__( norm_layer = nn.BatchNorm2d if activation_layer is None: activation_layer = nn.ReLU6 - super(ConvBNActivation, self).__init__( + super().__init__( nn.Conv2d(in_planes, out_planes, kernel_size, stride, padding, dilation=dilation, groups=groups, bias=False), norm_layer(out_planes),