Hi @anujd9


Assuming your ssd model is instantiated as model, you should be able to access to the last ReLU layer of its feature_extractor by model.feature_extractor[-1][-1].relu
By using backward hook function (i.e., register it by model.feature_extractor[-1][-1].relu.register_backward_hook(your_backward_hook_func)`), you can get gradients at the layer.


To get the output from the last ReLU layer of its feature_extractor, you can use ForwardHookManager in torchdistill 3. Here is an example notebook 1 to demonstrate the feature.
In Section 3, you can use feature_extractor.-1.-1.relu as the module path for torchdistill like forward_hook_manager.add_hook(model, 'feature_extractor.-1.-1.relu', requires_input=True, requires_output=True)