Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
0 answers
140 views

How to convert a libtorch model to ONNX using only C++ (no Python)?

I have a Libtorch model that I would like to convert to ONNX format, using only C++, to inference in production in OpenCV, but I haven't found any way to do it, (or to convert it to any model that ...
אליעזר אביחיל's user avatar
4 votes
1 answer
455 views

Why use Caffe2 or Core-ML instead of LibTorch(.pt file) on iOS?

It seems like there are several ways to run Pytorch models on iOS. PyTorch(.pt) -> onnx -> caffe2 PyTorch(.pt) -> onnx -> Core-ML (.mlmodel) PyTorch(.pt) -> LibTorch (.pt) PyTorch Mobile? What is ...
Kjyong's user avatar
  • 315
1 vote
1 answer
4k views

Libtorch: How to load an ONNX-model?

I need to load and run an ONNX-model in a C++ environment using Libtorch on Windows 10 (Visual Studio 2015, v140). Searching the web, there seem to be almost exclusivly instructions for how to do it ...
ueezb's user avatar
  • 43
1 vote
1 answer
2k views

Incorrect results obtained on running a model in LibTorch that was trained and exported from PyTorch

I am trying to export a trained model along with weights for inference in C++ using LibTorch. However, the output tensor results do not match. The shape of the output tensor is the same. model = FCN(...
Shayan's user avatar
  • 2,461