How can I save Neural Network Statsitics?
6 views (last 30 days)
Show older comments
Hello guys. I am trying to write few lines of a MATLAB script to save my Neural Network (ANN) stasitics. I usually create and train the network like this:
ANN=newff(Input,Output,[100 100 100]);
ANN=train(ANN,Input,Output);
view(ANN)
Where the view(ANN) shows me some nice staisitics in a new window. Now, how can I save this view of the window as an image (or any other format)? I know there are manual options to save this window but I want to do it using a script (code) because I am iteratively doing this training, so it will be inefficient to save it manually for each training.
0 Comments
Accepted Answer
Ayush
on 29 Aug 2023
Edited: Ayush
on 29 Aug 2023
To programmatically save the statistics of a neural network in MATLAB, you can use the 'save' function to save the relevant variables to a file:
% Train your neural network
net = trainNetwork(inputData, targetData, layers);
After training the network using 'trainNetwork', you can access the statistics you are interested in, such as the forward propagation times, by accessing the appropriate properties of the network.
% Obtain the statistics
stats = net.Layers(end).ForwardPropTimes;
% Save the statistics to a file
save('network_stats.mat', 'stats');
You may read further on ‘save’ function: https://in.mathworks.com/help/matlab/ref/save.html
Thanks,
Ayush Jaiswal
0 Comments
More Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!