submodules)

Constructing the input and doing preprocessing using C++ Tensor API

Extending PyTorch and TorchScript with C++ Extensions
TorchScript can be augmented with user-supplied code through custom
operators and custom classes. Once registered with TorchScript, these
operators and classes can be invoked in TorchScript code run from
Python or from C++ as part of a serialized TorchScript model. The
Extending TorchScript with Custom C++ Operators tutorial walks through
interfacing TorchScript with OpenCV. In addition to wrapping a
function call with a custom operator, C++ classes and structs can be
bound into TorchScript through a pybind11-like interface which is
explained in the Extending TorchScript with Custom C++ Classes
tutorial.
Tensor and Autograd in C++
Most of the tensor and autograd operations in PyTorch Python API are
also available in the C++ API. These include: