Skip to content

Commit d7c20dd

Browse files
Add missing model tracing step to cpp example readme, fixes pytorch#7952 (pytorch#7963)
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
1 parent b6574c9 commit d7c20dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/cpp/hello_world/README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Once both dependencies are sorted, we can start the CMake fun:
1010

1111
1) Create a ``build`` directory inside the current one.
1212
2) from within the ``build`` directory, run the following commands:
13+
- ``python ../trace_model.py`` To use a torchvision model in C++, you must first export it from the python version of torchvision. More information can be found on the corresponding `documentation page <https://pytorch.org/tutorials/advanced/cpp_export.html#loading-a-torchscript-model-in-c>`_.
1314
- | ``cmake -DCMAKE_PREFIX_PATH="<PATH_TO_LIBTORCH>;<PATH_TO_TORCHVISION>" ..``
1415
| where ``<PATH_TO_LIBTORCH>`` and ``<PATH_TO_TORCHVISION>`` are the paths to the libtorch and torchvision installations.
1516
- ``cmake --build .``

0 commit comments

Comments
 (0)