How to use of 'prediction block' in Simulink
14 ビュー (過去 30 日間)
古いコメントを表示
% One-dimension data was generated and the tranined net was save to 'TrainedNetwork_for_Simulation.mat'
% Generate data
t = 0:0.1:50;
y = sin(t) + 0.1 * randn(size(t));
% Train the network
net= feedforwardnet;
net = train(net,t,y);
% Save the trained network
save('TrainedNetwork_for_simulink', 'net');
% I'm trying to use a trained network in a Simulink model(TestPredict.slx), but I'm getting an error. The error message indicates that
% Error in 'TestPredict/Predict': Failed to evaluate mask initialization commands.
% Caused by:
% MAT file TrainedNetwork_for_simulink.mat does not contain a valid SeriesNetwork, DAGNetwork, dlnetwork, yolov2ObjectDetector or an %% % ssdObjectDetector object.
1 件のコメント
AJ Ibraheem
2025 年 10 月 6 日 13:14
The 'Predict' block does not support the network type that you've trained.
Try training your network using trainnet instead, see https://uk.mathworks.com/help/deeplearning/ref/trainnet.html
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Sequence and Numeric Feature Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!