I want to save view(net) as an image in 2013b. I searched (https://s​tackoverfl​ow.com/que​stions/149​19140/matl​ab-how-to-​save-view-​configurat​ion) and used them but not succeeded.

1 view (last 30 days)
% Solve an Input-Output Fitting problem with a Neural Network
% Script generated by Neural Fitting app
% Created 19-Nov-2023 14:43:06
%
% This script assumes these variables are defined:
%
% t - input data.
% z_num - target data.
x = t';
t = z_num';
% Choose a Training Function
% For a list of all training functions type: help nntrain
% 'trainlm' is usually fastest.
% 'trainbr' takes longer but may be better for challenging problems.
% 'trainscg' uses less memory. Suitable in low memory situations.
trainFcn = 'trainbr'; % Levenberg-Marquardt backpropagation.
% Create a Fitting Network
hiddenLayerSize = 12;
net = fitnet(hiddenLayerSize,trainFcn);
net.trainParam.epochs = 20;
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,x,t);
% Test the Network
y_P98 = net(x);
e_P98 = gsubtract(t,y_P98);
performance = perform(net,t,y_P98);
view(net);

Answers (0)

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!