diff --git a/ppcls/arch/backbone/legendary_models/resnet.py b/ppcls/arch/backbone/legendary_models/resnet.py index 88b197c8f885bafea8fa112105bc8237ce357d0b..4a3d40f37fb3ed0008777643469841ef3ac38b80 100644 --- a/ppcls/arch/backbone/legendary_models/resnet.py +++ b/ppcls/arch/backbone/legendary_models/resnet.py @@ -137,11 +137,11 @@ class ConvBNLayer(TheseusLayer): weight_attr = ParamAttr(learning_rate=lr_mult, trainable=True) bias_attr = ParamAttr(learning_rate=lr_mult, trainable=True) - self.bn = BatchNorm2D( + self.bn = BatchNorm( num_filters, - weight_attr=ParamAttr(learning_rate=lr_mult), + param_attr=ParamAttr(learning_rate=lr_mult), bias_attr=ParamAttr(learning_rate=lr_mult), - data_format=data_format) + data_layout=data_format) self.relu = nn.ReLU() def forward(self, x):