Can ScriptModule be used for training?

Can ScriptModule be used for training? The reason we ask this question is that we found some source code related back propagation in torch.jit.

1 Like

I am having the same question, did you find an answer?


I coudn’t find any example or explicit statement in the documentation. Here, it is stated that

TorchScript is a way to create serializable and optimizable models from PyTorch code

but I think in this context optimizable refers to the just-in-time compilation.

The question could also be rephrased to: Is there an alternative to the function parameters() in torch::jit::script::Module, which enables the use of optimizers?


I opened in issue on github, regarding the documentation for this use case: