loadLiteRTModel
Syntax
Description
Add-On Required: This feature requires the MATLAB Coder Support Package for PyTorch and LiteRT Models add-on.
loads a pretrained LiteRT model file.model = loadLiteRTModel(modelFileName)
loads a pretrained LiteRT model file using the specified execution mode.model = loadLiteRTModel(modelFileName,ExecutionMode=ExecutionMode)
Examples
Input Arguments
Output Arguments
Limitations
You must train the model using TensorFlow 2 or Keras 3, and convert it to LiteRT format.
loadLiteRTModel does not support loading:
Models saved in MAT-files.
Models that include custom operators other than LiteRT built-in operators. For more information about LiteRT operator compatibility, see https://ai.google.dev/edge/litert/conversion/tensorflow/ops_compatibility.
Models with stateful RNN layers.
Quantized models.
Models with complex data types.
Extended Capabilities
Version History
Introduced in R2026a