How to create VHDL code of a Neural Network block created through GENSIM command ?
5 ビュー (過去 30 日間)
古いコメントを表示
回答 (1 件)
Kiran Kintali
2023 年 7 月 16 日
This example shows how to convert a neural network regression model (created using gensim) to HDL Code.
% The engine_dataset contains data representing the relationship between the fuel rate and speed of the engine, and its torque and gas emissions. Use the Neural Net Fitting app (nftool) from Deep Learning Toolbox™ to train a neural network to estimate torque and gas emissions of an engine given the fuel rate and speed.
load engine_dataset;
% Use the following commands to train the neural network.
x = engineInputs;
t = engineTargets;
net = fitnet(10);
net = train(net,x,t);
view(net)
%close all GUI after inspection
nnet.guis.closeAllViews();
% Once the network is trained, use the gensim function from the Deep Learning Toolbox to generate a Simulink model.
[sysName, netName] = gensim(net, 'Name', 'mTrainedNN');
Follow the steps in the example to do fixed-point conversion prior to HDL code generation.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!