Issue tracing FasterRcnn model

Hi all,
I’m trying to trace fasterrcnn_mobilenet_v3_large_fpn model (fine tuned with custom classes) to be used in an android app
when running the following code:

model = fasterrcnn_mobilenet_v3_large_fpn(pretrained=True)

input_tensor = torch.rand(1,3,224,224)
script_model = torch.jit.trace_module(model,input_tensor)"")

I get this problem:

/usr/local/lib/python3.7/dist-packages/torch/jit/ in trace_module(mod, inputs, optimize, check_trace, check_inputs, check_tolerance, strict, _force_outplace, _module_class, _compilation_unit)
911 if not isinstance(inputs, dict):
→ 912 raise AttributeError(“expected a dictionary of (method_name, input) pairs”)
914 old_module_map = torch.jit._trace._trace_module_map
AttributeError: expected a dictionary of (method_name, input) pairs

I guesss I’m missing something and not converting the model correctly? could you refer me to how it should be done?