未验证 提交 42f3e0dd 编写于 作者: G George Ni 提交者: GitHub

[cherry-pick] add resnet BasicBlock dcn (#3950)

* fix operators typo

* add BasicBlock dcn
上级 41117c99
...@@ -186,7 +186,6 @@ class BasicBlock(nn.Layer): ...@@ -186,7 +186,6 @@ class BasicBlock(nn.Layer):
dcn_v2=False, dcn_v2=False,
std_senet=False): std_senet=False):
super(BasicBlock, self).__init__() super(BasicBlock, self).__init__()
assert dcn_v2 is False, "Not implemented yet."
assert groups == 1 and base_width == 64, 'BasicBlock only supports groups=1 and base_width=64' assert groups == 1 and base_width == 64, 'BasicBlock only supports groups=1 and base_width=64'
self.shortcut = shortcut self.shortcut = shortcut
...@@ -239,7 +238,8 @@ class BasicBlock(nn.Layer): ...@@ -239,7 +238,8 @@ class BasicBlock(nn.Layer):
norm_type=norm_type, norm_type=norm_type,
norm_decay=norm_decay, norm_decay=norm_decay,
freeze_norm=freeze_norm, freeze_norm=freeze_norm,
lr=lr) lr=lr,
dcn_v2=dcn_v2)
self.std_senet = std_senet self.std_senet = std_senet
if self.std_senet: if self.std_senet:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册