Hi, I use this code snippet and trigger this warning,
    def hook_intermediate_layers(self):
        for name, m in self.backbone.named_modules():
            if name in self.return_layers:
                m.register_forward_hook(partial(self.copy_output, feat_id=self.return_layers[name]))

What should I do to eliminate the warning?