Hello All,
I am trying to trace the fasterrcnn-resnet50-fpn and save it in a .pt file later to be read and used by libtorch. I went through the thread- jit trace of fasterRCNN 2 and saw that the PR to add scriptability of fasterRCNN was merged
I am trying trace it using the following code (pytorch 1.6.0)
import torch
import torchvision
from PIL import Image

model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True).eval()
example = tuple(list(torch.rand((3, 640, 480))))
traced_Script = torch.jit.trace(model, example_inputs=example)
traced_Script.save("/Models/fasterrcnn.pt")

and run into the following error -
TypeError: forward() takes from 2 to 3 positional arguments but 4 were given

The torchvision documentation says we are supposed to provide the input as list so I went ahead with that,
Could anyone please tell what could be going wrong
TIA