Uploaded January 2026 | Updated September 2026, 2 hours ago
Download Project ➡️ github.com/Vinayak-D/libtorch_onnx_examples
Resources ⬇️
~~ Get PyTorch: pytorch.org
~~ Get ONNXRuntime: github.com/microsoft/onnxruntime/releases
(See the repo for all dependencies)
Most machine learning and AI models are built in Python using PyTorch, TensorFlow, or JAX. However when it comes to deployment, Python is not necessarily the best option.
For training and building your neural networks, Python is ideal as the syntax is straightforward, plenty of visualization tools are readily available, and it is the most popular tool in industry.
For better performance you can convert your PyTorch models to C++ and run inference significantly faster. In this video, I walk you through exactly how to do that using two tools: LibTorch and ONNX (Open Neural Network Exchange).
We’ll focus specifically on feedforward neural networks and convolutional neural networks (CNNs), making this a practical, hands-on guide for optimizing real-world models.
I have demonstrated this functionality on both MAC OSX and Linux. We will discover that (....) demonstrates the fastest inference (on CPU).
Timestamps ⬇️
Intro: 00:50
Dependencies: 04:40
Exporting from PyTorch: 06:45
LibTorch with CPP: 17:50
ONNX with CPP: 24:25
End to End Demo (on Ubuntu): 35:15
Thanks for watching!
~~My Udemy Courses on Motion Planning / Navigation / Flight Simulation / Aerospace Engineering
udemy.com/user/vinayak-deshpande-22
~~Contact Me: vinayakd.com
~~Buy Coffee: buymeacoffee.com/vdengineering
~~Instagram: instagram.com/vinayak_desh
Download Project ➡️ github.com/Vinayak-D/libtorch_onnx_examples
Resources ⬇️
~~ Get PyTorch: pytorch.org
~~ Get ONNXRuntime: github.com/microsoft/onnxruntime/releases
(See the repo for all dependencies)
Most machine learning and AI models are built in Python using PyTorch, TensorFlow, or JAX. However when it comes to deployment, Python is not necessarily the best option.
For training and building your neural networks, Python is ideal as the syntax is straightforward, plenty of visualization tools are readily available, and it is the most popular tool in industry.
For better performance you can convert your PyTorch models to C++ and run inference significantly faster. In this video, I walk you through exactly how to do that using two tools: LibTorch and ONNX (Open Neural Network Exchange).
We’ll focus specifically on feedforward neural networks and convolutional neural networks (CNNs), making this a practical, hands-on guide for optimizing real-world models.
I have demonstrated this functionality on both MAC OSX and Linux. We will discover that (....) demonstrates the fastest inference (on CPU).
Timestamps ⬇️
Intro: 00:50
Dependencies: 04:40
Exporting from PyTorch: 06:45
LibTorch with CPP: 17:50
ONNX with CPP: 24:25
End to End Demo (on Ubuntu): 35:15
Thanks for watching!
~~My Udemy Courses on Motion Planning / Navigation / Flight Simulation / Aerospace Engineering
udemy.com/user/vinayak-deshpande-22
~~Contact Me: vinayakd.com
~~Buy Coffee: buymeacoffee.com/vdengineering
~~Instagram: instagram.com/vinayak_desh










