diff --git a/ppcls/arch/backbone/legendary_models/hrnet.py b/ppcls/arch/backbone/legendary_models/hrnet.py index 05ebf525d955ed1c78474f823e9adec93f3cad7c..99f4de418c827bb6d1392e2f870964ac4fc63d4b 100644 --- a/ppcls/arch/backbone/legendary_models/hrnet.py +++ b/ppcls/arch/backbone/legendary_models/hrnet.py @@ -370,16 +370,14 @@ class LastClsOut(TheseusLayer): name=None): super(LastClsOut, self).__init__() - self.func_list = [] + self.func_list = nn.LayerList() for idx in range(len(num_channel_list)): - func = self.add_sublayer( - "conv_{}_conv_{}".format(name, idx + 1), + self.func_list.append( BottleneckBlock( num_channels=num_channel_list[idx], num_filters=num_filters_list[idx], has_se=has_se, downsample=True)) - self.func_list.append(func) def forward(self, inputs, res_dict=None): outs = []