I want to store the data of MSE vs epoch obtained during training of the neural network. By using "plotperform(TR)" we are able to get the MSE vs epoch graph but not the data itself. How to store this MSE vs epoch data in array variable?
조회 수: 4 (최근 30일)
이전 댓글 표시
how to obtain MSE vs Epoch data of training the neural network in MATLAB? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc;clear all;close all;
t=0:0.01:10;
s=sin(2*pi*1*t);
in=t;
out=s;
net_size_array={[5] [10] [20] [5 5] [10 10] [20 20] [5 5 5] [10 10 10] [20 20 20]};
size_training=length(net_size_array);
for i=1:size_training
net=fitnet(cell2mat(net_size_array(i)));
[net, TR]=train(net,in,out);
figure(1)
plotperform_pk(TR);grid on;hold on;
end
%% I want to store and plot the MSE vs Epoch graph for various neural network size.
댓글 수: 0
답변 (1개)
Sai Praneet
2020년 10월 24일
편집: Sai Praneet
2020년 10월 24일
In your code the line:
[net, TR]=train(net,in,out);
stores all the essential information in the structure variable "TR". To get the Epoch vs. MSE data corresponding to the training, validation, and testing set all we have to do is store them in some variables for each network size such as
train_mse = TR.perf ;
val_mse = TR.vperf;
test_mse = TR.tperf;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!