clear;close all;
%Define a 2-3-1 MLP with Sigmoidal
Neurons at
the Hidden
%and output layers; train using gradient
descent
backprop
net=newff([0 5; 0
5],[3,1],{'logsig','logsig'},'traingd');
%Show training progress every 50 epochs
net.trainParam.show=50;
%Set learning rate to 0.5
net.trainParam.lr=0.5;
%Set maximum epochs to 1000
net.trainParam.epochs=1000;
%Set error goal to 0.01
net.trainparam.goal=1e-2;
%Define training input and target data
vectors
p=[[1;1],[1;2],[2;1],[1.5;3.0],[2.0;2.0],[3.0;1.7]];
t=[0 0 0 1 1 1];
figure; plotpv(p,t);
figure;
%train the network
net=train(net,p,t);
%Test network
a1=sim(net,[1.5;1.5])
a2=sim(net,[2.5;2.5])
As part of your neural network design process, you will experiment with
Your laboratory report (individual
report is required of each student) should be in the usual
format.
Instructor | Schedule | Textbook | Tutorials | Grading | Links | Homepage |