Code Generation for PyTorch and LiteRT Models
Since R2026a
With MATLAB® Coder™ Support Package for PyTorch and LiteRT Models, you can:
Load PyTorch ExportedProgram and LiteRT (TensorFlow Lite or TFLite) models to MATLAB code and Simulink® models. You can load a variety of pretrained deep learning networks, including YOLOv11, Whisper, DINOv2, Depth Anything, and SAM2.
Generate code for TensorFlow or Keras models by converting them to LiteRT format.
Generate and deploy target-independent C and C++ code for PyTorch ExportedProgram and LiteRT models.
Generate optimized plain CUDA® code by using GPU Coder™.
Use code replacement libraries to incorporate processor-specific intrinsics for target hardware.
This support package is not supported on MATLAB Online™.
Categories
- Get Started
Learn the basics of the MATLAB Coder Support Package for PyTorch and LiteRT Models
- Generate Code for PyTorch and LiteRT Models in MATLAB
Generate generic C, C++, and plain CUDA code from MATLAB code
- Generate Code for PyTorch and LiteRT Models in Simulink
Generate generic C, C++, and plain CUDA code from Simulink models