@@ -24,9 +24,6 @@ class BasicBlock3d(nn.Module):
24
24
stride-two layer is the 3x3 conv layer, otherwise the stride-two
25
25
layer is the first 1x1 conv layer. Default: 'pytorch'.
26
26
inflate (bool): Whether to inflate kernel. Default: True.
27
- inflate_style (str): ``3x1x1`` or ``1x1x1``. which determines the
28
- kernel sizes and padding strides for conv1 and conv2 in each block.
29
- Default: '3x1x1'.
30
27
non_local (bool): Determine whether to apply non-local module in this
31
28
block. Default: False.
32
29
non_local_cfg (dict): Config for non-local module. Default: ``dict()``.
@@ -50,16 +47,17 @@ def __init__(self,
50
47
downsample = None ,
51
48
style = 'pytorch' ,
52
49
inflate = True ,
53
- inflate_style = '3x1x1' ,
54
50
non_local = False ,
55
51
non_local_cfg = dict (),
56
52
conv_cfg = dict (type = 'Conv3d' ),
57
53
norm_cfg = dict (type = 'BN3d' ),
58
54
act_cfg = dict (type = 'ReLU' ),
59
- with_cp = False ):
55
+ with_cp = False ,
56
+ ** kwargs ):
60
57
super ().__init__ ()
61
58
assert style in ['pytorch' , 'caffe' ]
62
- assert inflate_style in ['3x1x1' , '3x3x3' ]
59
+ # make sure that only ``inflate_style`` is passed into kwargs
60
+ assert set (kwargs .keys ()).issubset (['inflate_style' ])
63
61
64
62
self .inplanes = inplanes
65
63
self .planes = planes
@@ -68,7 +66,6 @@ def __init__(self,
68
66
self .dilation = dilation
69
67
self .style = style
70
68
self .inflate = inflate
71
- self .inflate_style = inflate_style
72
69
self .conv_cfg = conv_cfg
73
70
self .norm_cfg = norm_cfg
74
71
self .act_cfg = act_cfg
@@ -166,7 +163,7 @@ class Bottleneck3d(nn.Module):
166
163
stride-two layer is the 3x3 conv layer, otherwise the stride-two
167
164
layer is the first 1x1 conv layer. Default: 'pytorch'.
168
165
inflate (bool): Whether to inflate kernel. Default: True.
169
- inflate_style (str): ``3x1x1`` or ``1x1x1 ``. which determines the
166
+ inflate_style (str): ``3x1x1`` or ``3x3x3 ``. which determines the
170
167
kernel sizes and padding strides for conv1 and conv2 in each block.
171
168
Default: '3x1x1'.
172
169
non_local (bool): Determine whether to apply non-local module in this
0 commit comments