Skip to content

Commit 5cad35b

Browse files
authored
fix deprecated wrappers exiting bug (#567)
1 parent cc332b2 commit 5cad35b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mmcv/ops/deprecated_wrappers.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class Conv2d_deprecated(Conv2d):
99

10-
def __init__(*args, **kwargs):
10+
def __init__(self, *args, **kwargs):
1111
super().__init__(*args, **kwargs)
1212
warnings.warn(
1313
'Importing Conv2d wrapper from "mmcv.ops" will be deprecated in'
@@ -16,7 +16,7 @@ def __init__(*args, **kwargs):
1616

1717
class ConvTranspose2d_deprecated(ConvTranspose2d):
1818

19-
def __init__(*args, **kwargs):
19+
def __init__(self, *args, **kwargs):
2020
super().__init__(*args, **kwargs)
2121
warnings.warn(
2222
'Importing ConvTranspose2d wrapper from "mmcv.ops" will be '
@@ -26,7 +26,7 @@ def __init__(*args, **kwargs):
2626

2727
class MaxPool2d_deprecated(MaxPool2d):
2828

29-
def __init__(*args, **kwargs):
29+
def __init__(self, *args, **kwargs):
3030
super().__init__(*args, **kwargs)
3131
warnings.warn(
3232
'Importing MaxPool2d wrapper from "mmcv.ops" will be deprecated in'
@@ -35,7 +35,7 @@ def __init__(*args, **kwargs):
3535

3636
class Linear_deprecated(Linear):
3737

38-
def __init__(*args, **kwargs):
38+
def __init__(self, *args, **kwargs):
3939
super().__init__(*args, **kwargs)
4040
warnings.warn(
4141
'Importing Linear wrapper from "mmcv.ops" will be deprecated in'

0 commit comments

Comments
 (0)