Skip to content

libtorch example, This is a tutorial on the whole process of creating a model with pytorch and loading it from c++.

License

dankernel/libtorch-sample

Repository files navigation

Install libtorch

wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
unzip libtorch-shared-with-deps-latest.zip

Create traced model

python main.py

Build C++ code & Run

mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/home/.../pytorch2cpp/libtorch ..
make -j4

Ref : Link

About

libtorch example, This is a tutorial on the whole process of creating a model with pytorch and loading it from c++.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published