Clear Filters
Clear Filters

How can I save Neural Network Statsitics?

10 views (last 30 days)
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]);
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.

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:
Ayush Jaiswal

More Answers (0)


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!