Get Started
R2026bSince 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.
To get this support package, perform the steps described in Install MATLAB Coder Support Package for PyTorch and LiteRT Models.
Functions
coder.torchSetup | (Removed) Install third-party tools for PyTorch code generation |
Topics
Basics
- Install MATLAB Coder Support Package for PyTorch and LiteRT Models
Install the support package and tools for code generation for PyTorch and LiteRT models. - Prepare PyTorch Models for MATLAB and Simulink Code Generation
Export a PyTorch model as a ExportedProgram file to be loaded with loadPyTorchExportedProgram. - Verify Numerical Consistency of a LiteRT or PyTorch ExportedProgram Model in Python
Verify numerical consistency between Python® and MATLAB.
Generate Code for Quantized Models (Tech Preview)
- Code Generation for Quantized LiteRT Models (Tech Preview)
Generate C, C++, or CUDA code for quantized LiteRT models. (Since R2026b) - Generate Code for Segmentation Application Using Quantized LiteRT Model (Tech Preview)
Generate CUDA code for segmentation application by using quantized YOLO V11 LiteRT models. (Since R2026b)