Thanks @ptrblck .
The torchscript we have doesn’t use model.act.
So we may have to use the second option. Can you please point me to an example of writing a custom model to override the forward method?