Feature pyramid

Hi, I want to just use layer three or four of FPN. From the following code line, how may I extract third line?
features = self.backbone(images.tensors)

features[1]? By this I face with an error for this part:
x, result, detector_losses = self.roi_heads(features, proposals…

Any help?

To get intermediate activations, you could use forward hooks.

If that’s not possible for your use case, could you post the error message you are getting?