C++
Note:
If you are looking for the PyTorch C++ API docs, directly go here.
PyTorch provides several features for working with C++, and itâs best
to choose from them based on your needs. At a high level, the
following support is available:
TorchScript C++ API
TorchScript allows PyTorch models defined in Python to be serialized
and then loaded and run in C++ capturing the model code via
compilation or tracing its execution. You can learn more in the
Loading a TorchScript Model in C++ tutorial. This means you can define
your models in Python as much as possible, but subsequently export
them via TorchScript for doing no-Python execution in production or
embedded environments. The TorchScript C++ API is used to interact
with these models and the TorchScript execution engine, including:


Loading serialized TorchScript models saved from Python


Doing simple model modifications if needed (e.g. pulling out
  submodules)

