purely in C++, with familiar components such as "torch::nn" /
"torch::nn::functional" / "torch::optim" that closely resemble the
Python API.


For an overview of the PyTorch C++ model authoring and training API,
  please see: https://pytorch.org/cppdocs/frontend.html


For a detailed tutorial on how to use the API, please see:
  https://pytorch.org/tutorials/advanced/cpp_frontend.html


Docs for components such as "torch::nn" / "torch::nn::functional" /
  "torch::optim" can be found at:
  https://pytorch.org/cppdocs/api/library_root.html


Packaging for C++
For guidance on how to install and link with libtorch (the library
that contains all of the above C++ APIs), please see:
https://pytorch.org/cppdocs/installing.html. Note that on Linux there
are two types of libtorch binaries provided: one compiled with GCC
pre-cxx11 ABI and the other with GCC cxx11 ABI, and you should make
the selection based on the GCC ABI your system is using.