diff --git a/ppcls/arch/backbone/base/theseus_layer.py b/ppcls/arch/backbone/base/theseus_layer.py index 4b4f1e76af2ebeeb4d80bb8b9806df6caf9be74d..875131cb7be371a175dad1f4c0ecb9c75827b914 100644 --- a/ppcls/arch/backbone/base/theseus_layer.py +++ b/ppcls/arch/backbone/base/theseus_layer.py @@ -45,11 +45,11 @@ class TheseusLayer(nn.Layer): if return_layers is not None and re.match(return_pattern, layer_name): self._sub_layers[layer_i].register_forward_post_hook(self._save_sub_res_hook) - def _save_sub_res_hook(self, layer, input, output): - self.res_dict[layer.full_name()] = output - - def _disconnect_res_dict_hook(self, input, output): - self.res_dict = None + # def _save_sub_res_hook(self, layer, input, output): + # self.res_dict[layer.full_name()] = output + # + # def _disconnect_res_dict_hook(self, input, output): + # self.res_dict = None def replace_sub(self, layer_name_pattern, replace_function, recursive=True): for layer_i in self._sub_layers: