What is the error message 'Unrecognized field name "summary".' from loadPyTorc​hExportedP​rogram() ?

Hi, everyone !
I am trying converting PyTorch python codes into MATLAB codes and then code-generating them to C/C++.
So, I have tested the MATLAB function 'loadPyTorchExportedProgram(). However, when the function is called with my exported PyTorch code, it is always failed showing the error message, Unrecognized field name "summary".
I obeyed the requirements for the function as follows:
  • PyTorch version 2.8.0 used
  • MATLAB Coder Support Package for PyTorch and LiteRT Models installed
  • In PyTorch code, the model exported using torch.export.export() and torch.export.save()
There is a strange point. Although sample codes and process described in the MATLAB document 'Prepare PyTorch Models for MATLAB and Simulink Code Generation - MATLAB & Simulink' are used as-is, the result is always the same as follows.
What is the problem ?

 Akzeptierte Antwort

Song-Hyun Ji
Song-Hyun Ji am 21 Sep. 2026 um 6:43
As confirmed after contacting MathWorks Technical Support, the issue was resolved by installing a supported C++ compiler and configuring it using mex -setup C++.

Weitere Antworten (0)

Produkte

Version

R2026a

Gefragt:

am 16 Sep. 2026 um 1:55

Beantwortet:

am 21 Sep. 2026 um 6:43

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by