提交 19850755 编写于 作者: W weishengyu

dbg

上级 ef13f8c6
...@@ -41,7 +41,7 @@ class TheseusLayer(nn.Layer): ...@@ -41,7 +41,7 @@ class TheseusLayer(nn.Layer):
layer_name = self._sub_layers[layer_i].full_name() layer_name = self._sub_layers[layer_i].full_name()
for return_pattern in return_patterns: for return_pattern in return_patterns:
if re.match(return_pattern, layer_name): if re.match(return_pattern, layer_name):
if not isinstance(self._sub_layers[layer_i], TheseusLayer): if not isinstance(self._sub_layers[layer_i], TheseusLayer) and not isinstance(self, WrapLayer):
self._sub_layers[layer_i] = wrap_theseus(self._sub_layers[layer_i], return_patterns) self._sub_layers[layer_i] = wrap_theseus(self._sub_layers[layer_i], return_patterns)
self._sub_layers[layer_i].register_forward_post_hook( self._sub_layers[layer_i].register_forward_post_hook(
self._sub_layers[layer_i]._save_sub_res_hook) self._sub_layers[layer_i]._save_sub_res_hook)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册