Skip to content

Rokuki/pytorch-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytorch-cpp

Usage

Download libtorch

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

Tracing model and save model.pt

  1. Modify to_cpp.py
  2. Generate model.pt
python to_cpp.py

Build

$ cd pytorch-cpp
$ mkdir build;cd build
$ cmake -DCMAKE_PREFIX_PATH=<path to libtorch> ..
$ make
$ ./example-app ../model.pt <img_path>

output

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published