提交 c7608cbf 编写于 作者: W weishengyu

remove add_sublayers

上级 c9d5694c
...@@ -370,16 +370,14 @@ class LastClsOut(TheseusLayer): ...@@ -370,16 +370,14 @@ class LastClsOut(TheseusLayer):
name=None): name=None):
super(LastClsOut, self).__init__() super(LastClsOut, self).__init__()
self.func_list = [] self.func_list = nn.LayerList()
for idx in range(len(num_channel_list)): for idx in range(len(num_channel_list)):
func = self.add_sublayer( self.func_list.append(
"conv_{}_conv_{}".format(name, idx + 1),
BottleneckBlock( BottleneckBlock(
num_channels=num_channel_list[idx], num_channels=num_channel_list[idx],
num_filters=num_filters_list[idx], num_filters=num_filters_list[idx],
has_se=has_se, has_se=has_se,
downsample=True)) downsample=True))
self.func_list.append(func)
def forward(self, inputs, res_dict=None): def forward(self, inputs, res_dict=None):
outs = [] outs = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册