Skip to content

Commit b4a2918

Browse files
committed
rename args convmixer
1 parent 69e2479 commit b4a2918

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

model_constructor/convmixer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ def ConvMixerOriginal(dim, depth,
4242
class ConvLayer(nn.Sequential):
4343
"""Basic conv layers block"""
4444

45-
def __init__(self, ch_in, ch_out, kernel_size, stride=1,
45+
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
4646
act_fn=nn.GELU(), padding=0, groups=1,
4747
bn_1st=False, pre_act=False):
4848

49-
conv_layer = [('conv', nn.Conv2d(ch_in, ch_out, kernel_size, stride=stride,
49+
conv_layer = [('conv', nn.Conv2d(in_channels, out_channels, kernel_size, stride=stride,
5050
padding=padding, groups=groups))]
5151
act_bn = [
5252
('act_fn', act_fn),
53-
('bn', nn.BatchNorm2d(ch_out))
53+
('bn', nn.BatchNorm2d(out_channels))
5454
]
5555
if bn_1st:
5656
act_bn.reverse()

0 commit comments

Comments
 (0)