提交 7d5ffc20 编写于 作者: P pengmian

modify resnet some layers name

上级 6a2361b6
......@@ -133,7 +133,13 @@ class ResNet():
if layers >= 50:
for block in range(len(depth)):
for i in range(depth[block]):
conv_name = "conv" + str(block + 2) + '_' + str(1 + i)
if layers in [101, 152] and block == 2:
if i == 0:
conv_name = "res" + str(block + 2) + "a"
else:
conv_name = "res" + str(block + 2) + "b" + str(i)
else:
conv_name = "conv" + str(block + 2) + '_' + str(1 + i)
dilation_rate = get_dilated_rate(dilation_dict, block)
if self.stem == 'pspnet':
......@@ -172,7 +178,7 @@ class ResNet():
else:
for block in range(len(depth)):
for i in range(depth[block]):
conv_name = "conv" + str(block + 2) + chr(97 + i)
conv_name = "res" + str(block + 2) + chr(97 + i)
conv = self.basic_block(
input=conv,
num_filters=num_filters[block],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册