From 198507555012f8fb82db4703f40fa7a0f6e613a3 Mon Sep 17 00:00:00 2001 From: weishengyu Date: Sun, 8 Aug 2021 15:18:28 +0800 Subject: [PATCH] dbg --- ppcls/arch/backbone/base/theseus_layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppcls/arch/backbone/base/theseus_layer.py b/ppcls/arch/backbone/base/theseus_layer.py index f3fda767..2efe72ed 100644 --- a/ppcls/arch/backbone/base/theseus_layer.py +++ b/ppcls/arch/backbone/base/theseus_layer.py @@ -41,7 +41,7 @@ class TheseusLayer(nn.Layer): layer_name = self._sub_layers[layer_i].full_name() for return_pattern in return_patterns: 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].register_forward_post_hook( self._sub_layers[layer_i]._save_sub_res_hook) -- GitLab