Error when loading pretrained layers in fasterRCNN torchvision

Hi, I’m trying to use pretrained FasterRCNN network provided in torchvision.
working perfectly fine but when I use sequential to stop at intermediate layers like this
to use until FPN network I’m getting error when passing a image as show below
TypeError: conv2d(): argument 'input' (position 1) must be Tensor, not tuple

I want this because I want to get Region Proposal Network output from faster rcnn for another model training. Thanks in advance for the help

@fmassa can you help me with this?

@fmassa I have adopted code from and implemented to get RPN output. But unfortunately I am unable to get Kx2048 vector output. Instead I am getting 14x4. Can you please help me with this?