What is the error message 'Unrecognized field name "summary".' from loadPyTorchExportedProgram() ?
Show older comments
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 ?
1 Comment
Angelo Yeo
on 17 Sep 2026

Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!