Take detectron2 as an example. I have transformed a model from detectron2 with torch.jit.script to torchscript, the input of which is annotated with detectron2.structures.box. Because there is no detectron2 python package in the deployment environment of the torchscript module , I define another input data class x.box which has totally the same codes as detectron2.structures.box. But when this new input class is sent to the torchscript module, an error happened:
RuntimeError: classType INTERNAL ASSERT FAILED at /pytorch/torch/csrc/jit/python/pybind_utils.h:742, please report a bug to PyTorch.
Is this mean that I must send the same input data class(detectron2.structures.box) to the model? Or, is there any ways to make it work?
Thanks a lot:)