Generating an m-file from a simulink model for neural networks
2 次查看(过去 30 天)
显示 更早的评论
I was wondeing if it is possible to generate an m-file from a simulink model to allow me edit the code using the text editor. The reason that I would like to do this is generate an m-file of a neural network and it was suggested to me to generate a simulink model and from that generate the m-file however there does not appear to be any straightforward method of doing this. If anyone knows a way of generating an m-file of a neural network in the toolbox that would be great as well, I know that when making a network using the GUIs that go through a step-by-step process it is very easy however I am not sure what to do when using nntool. Any help would be very much appreciated.
Thank you
0 个评论
回答(1 个)
Michael
2011-3-3
André, as I understand you are looking for a way to generate a MATLAB file from a neural network. You can save the trained network to a .mat file, but it's not possible to actually generate MATLAB code from the network.
A network is like a black box. It has been trained to perform a certain task, but it can not recover training data nor describe all the necessary training steps it went through once. Simple comparison - I know how to play the piano (more or less) but it's not possible for me to write down a recipe on a piece of paper to enable someone else to play the piano in the exact same way I do, by simply reading my script of instructions.
If you are using a graphical design workflow to perform Clustering (>>nctool), Fitting (>>nftool) or Pattern Recognition (>>nprtool) you may want to capture all the design steps you performed by generating a MATLAB file from the 'Save Results' pane of those GUIs.
Hope this helps,
-Michael
2 个评论
anumukonda sai himaja
2016-3-2
please let me know how to view code for a network developed using nntool ??
另请参阅
类别
在 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!