未验证 提交 2bdb9a86 编写于 作者: G Guanghua Yu 提交者: GitHub

fix dygraph re5_head bug, test=dygraph (#2088)

上级 e7dbeb06
...@@ -530,14 +530,15 @@ class ResNet(nn.Layer): ...@@ -530,14 +530,15 @@ class ResNet(nn.Layer):
@register @register
class Res5Head(nn.Layer): class Res5Head(nn.Layer):
def __init__(self, feat_in=1024, feat_out=512): def __init__(self, depth=50, feat_in=1024, feat_out=512):
super(Res5Head, self).__init__() super(Res5Head, self).__init__()
na = NameAdapter(self) na = NameAdapter(self)
self.res5_conv = [] self.res5_conv = []
self.res5 = self.add_sublayer( self.res5 = self.add_sublayer(
'res5_roi_feat', 'res5_roi_feat',
Blocks( Blocks(
feat_in, feat_out, count=3, name_adapter=na, stage_num=5)) depth, feat_in, feat_out, count=3, name_adapter=na,
stage_num=5))
self.feat_out = feat_out * 4 self.feat_out = feat_out * 4
def forward(self, roi_feat, stage=0): def forward(self, roi_feat, stage=0):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册