MATLAB Answers

0

How can I plot a neural network?

Asked by Franck Dernoncourt on 22 Jan 2013
Latest activity Answered by Yashwant Kolluru on 12 Jul 2018
Say I created a neural network, such as net = feedforwardnet(30);, which I trained [net tr] = train(net,p,t);
How can I plot this neural network? I would like something like:
(I'm especially interested in having the weights displayed on the graph)
Thanks, Franck

  0 Comments

Sign in to comment.

2 Answers

Answer by Greg Heath
on 23 Jan 2013
 Accepted Answer

The only NNTBX display that is available is
view(net)
However, perhaps you can find something online.
Hope this helps.
Thank you for accepting my answer.
Greg

  1 Comment

Thanks for your answer, view() was indeed the only function I could find… But I'm surprised there is no existing code for such a common task. Maybe some function to output the network to a .dot file that we would give to GraphViz?

Sign in to comment.


Answer by Yashwant Kolluru on 12 Jul 2018

[a,b] = train(net,x,t); y = net(x); e = gsubtract(t,y); %%%%%%%%%%%%%%%%%%% figure, plotperform(b); figure, plottrainstate(b); figure, ploterrhist(e); figure, plotregression(t,y);
hope it helps

  0 Comments

Sign in to comment.