Unable to load lstmNet using coder

4 views (last 30 days)
Yusra Rahman
Yusra Rahman on 13 Apr 2022
Answered: Sayan Saha on 12 May 2022
Hello,
I'm getting this warning message when I'm attempting to load my SeriesNetwork model in matlab. I believe because of this warning, I am also unable to use codegen on a simple function I've created. Both coder.loadDeepLearningNetwork function (that I am using for my function when I use codegen to create a C++ executable) and the simple load function, both which are loading in a .mat file that contains only the net, give the same error of:
Warning: While saving an object of class 'SeriesNetwork':
Dot indexing is not supported for variables of this type.
I'm not sure where the dot indexing is occuring or how to resolve this issue. I need to fix the warning or else my codegen won't fully run. Let me know if I need to further explain anything else.
More details on the codegen error:
Warning: While loading an object of class 'SeriesNetwork':
Dot indexing is not supported for variables of this type.
> In dltargets.internal.loadMatObjImpl
In coder.loadMatObj
In coder.checkNetworkType (line 8)
In coder.internal.compile
In emlckernel
In emlckernel
In emlckernel
In emlckernel
In emlcprivate
In codegen
??? Dot indexing is not supported for variables of this type.

Answers (1)

Sayan Saha
Sayan Saha on 12 May 2022
Hi Yusra,
From the error message thrown it seems to me that the MATFile storing the network is likely corrupted. Can you try resaving the network to a new MATFile and see if loading the network using "load" in MATLAB works or not. If "load" itself fails, then codegen will also fail since during codegen the network is also loaded into MATLAB.
Also, are there any custom layers in the network that you are trying to load. It maybe that the custom layer is not on the PATH and hence loading the network fails. In that case, add the custom layer to the PATH using addPath and then try to load the network.
Hope this helps!
~Sayan

Community Treasure Hunt

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

Start Hunting!