"git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "be442561a538b1ecc73394eeba610c8a7e2b7f4a"
Unverified Commit d7c20ddf authored by Thomas Fritz's avatar Thomas Fritz Committed by GitHub
Browse files

Add missing model tracing step to cpp example readme, fixes #7952 (#7963)


Co-authored-by: default avatarPhilip Meier <github.pmeier@posteo.de>
parent b6574c92
...@@ -10,6 +10,7 @@ Once both dependencies are sorted, we can start the CMake fun: ...@@ -10,6 +10,7 @@ Once both dependencies are sorted, we can start the CMake fun:
1) Create a ``build`` directory inside the current one. 1) Create a ``build`` directory inside the current one.
2) from within the ``build`` directory, run the following commands: 2) from within the ``build`` directory, run the following commands:
- ``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>`_.
- | ``cmake -DCMAKE_PREFIX_PATH="<PATH_TO_LIBTORCH>;<PATH_TO_TORCHVISION>" ..`` - | ``cmake -DCMAKE_PREFIX_PATH="<PATH_TO_LIBTORCH>;<PATH_TO_TORCHVISION>" ..``
| where ``<PATH_TO_LIBTORCH>`` and ``<PATH_TO_TORCHVISION>`` are the paths to the libtorch and torchvision installations. | where ``<PATH_TO_LIBTORCH>`` and ``<PATH_TO_TORCHVISION>`` are the paths to the libtorch and torchvision installations.
- ``cmake --build .`` - ``cmake --build .``
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment