主要内容

Get Started

Learn the basics of the MATLAB® Coder™ Support Package 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.

To get this support package, perform the steps described in Install MATLAB Coder Support Package for PyTorch and LiteRT Models.

Functions

coder.torchSetupInstall third-party tools for PyTorch code generation

Topics