Step 4:
clear;
clc;
close all;
mynetwork=feedforwardnet([7,7]); % Create the network
mynetwork.layers{1:2}.transferFcn=
'logsig'; % Change the activation functions for the hidden layers to logsig
mynetwork.layers{3}.transferFcn=
'tansig'; % Change the activation function for the output layer to tansig
mynetwork.trainFcn = 'traingd';
Set the learning rate:
mynetwork.trainparam.lr = 0.2;
You
have now completed creating the network and changing a few of its
parameters. Run the program, then type view(mynetwork) in the
command window to also see its structure. Also note that this
network is ready to take data. The number of input and
output nodes for the network depend on your data, which is why they are
shown as zero in the network diagram (when you use
"view(mynetwork)").