Hello 辰磊,
Thanks for reaching out. There were known issues of the predict block, and were fixed later. You can avoid the error by upgrading to a later release, for example, as you verified using R2025b.
If you are unable to upgrade, a possible workaround in R2020b is calling a wrapper predict function from a MATLAB Function Block. This wrapper function loads the network and calls predict. However, this will not be suitable for deployment workflows.
Please let me know if you have encountered additional issues.
Thank you,
Jianghao

