-
Hi, I generated a torchscript model (model.ts) from a pre-trained mask-rcnn model.pt thanks to the python script export_model.py using the torchscript format and scripting export-method.
So the forward method seems to expect a Tuple[Dict[str, Tensor]] as inputs but I don't know how to do it in C++. My second question is about batch size. I've read that the batch size is fixed for model.ts generated via tracing export-method.
to set a batch size of 4 for example? Thanks in advance for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
A reference is given in #2582 (comment) |
Beta Was this translation helpful? Give feedback.
-
Concerning the definition of the batch size during export tracing I modified the python function export_tracing(torch_model, inputs).
then in C++ code I replaced module.forward({inputs}) by Regards |
Beta Was this translation helpful? Give feedback.
-
Hb |
Beta Was this translation helpful? Give feedback.
A reference is given in #2582 (comment)