Error when running a Simulink simulation with a tensorflow ANN using the "Predict" block

8 visualizzazioni (ultimi 30 giorni)
Hello everyone,
I have trained a simple neural network (2 hidden layers) in tensorflow and imported it into Matlab using the "importNetworkFromTensorflow" command. Now I want to use it in a Simulink simulation. To do this, I added the predict block, saved the model in a *.mat file and specified it there. The import seems to work (the layers are displayed accordingly in the mask). Unfortunately, I get the following error during the simulation and have not yet been able to find a description of the error or a solution to the problem.
Error in '.../Subsystem/Predict1': Failed to evaluate mask initialization commands.
Caused by:
Error using Simulink.Simulation.internal.DesktopSimHelper
Network input data format string cannot be empty
What do I have to do to make the simulation work?
I am using Tensorflow 2.10.1 and Matlab 2023b.
Thank you very much
  2 Commenti
Angelo Yeo
Angelo Yeo il 24 Gen 2024
In order to find the precise cause and solution for the issue you are currently experiencing, I believe that the following additional information would be necessary. If you could provide the following information, it would enable contributors, including myself, to assist you more effectively:
1) Example files and data files that can reproduce the issue
2) Exact steps to reproduce the same problem using the files you provided
3) All error messages that appear when the issue occurs
Sivylla Paraskevopoulou
Sivylla Paraskevopoulou il 24 Gen 2024
Hi Patrick, the error indicates there is an issue with the input. Without having more information, as Angelo suggested above, it's hard to know what exactly the issue is. Just a guess though... The importNetworkFromTensorFlow imports the model as a dlnetwork object. If you followed the example Classify Images in Simulink with Imported TensorFlow Network, the network is imported as a DAGNetwork object using the importTensorFlowNetwork function.You used the recommended import function, but there are probably some differences in formatting the input data.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Deep Learning Toolbox in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by