soldierofhell:

one needs to (1) train C++ and then (2) serialize model and then (3) load in C++ on the production, do you have to


The C++ frontend is a high level API that provides a similar experience as using PyTorch’s Python API, as such it has its own serialization mechanisms, so you can iterate on your model all in C++, this example shows how 18.
TorchScript lets you go from PyTorch models coded in Python to something that you can load in C++, so it’s not necessary for that case.