Or how to use torch. jit. ScriptModule to generate model.pt
It means you cannot share parameters (like weights) between modules and trace the forward() successfully. Consider decomposing your model into pieces that don’t share parameters.
Thanks for your reply.But I still don’t understand how to share parameters between modules, and how can I decompose it.