Hi!
I see that you have check_trace = False. There is a reason for that? Also, did you check traced module in pytorch? As it returns a different number of bboxes and trace doesn’t support control flow, it may have compiled another upsample_bilinear2d method. You can mix trace and scripting 16
Finally, if you face an error in pyotrch mobile, make sure that the exact same image runs well on the traced/scripted model in python to pinpoint where the bug reside (in your code, in torchscript, in  mobile, etc).