Moo SC 32
Moo SC 32
Moo SC 32
Experiment-3.2
1. Aim: To write a MATLAB program to train and test the back propagation neural networkfor
the generation of XOR function.
inputs = [0 0; 0 1; 1 0; 1 1];
targets = [0; 1; 1; 0];
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
input_neurons = 2;
hidden_neurons = 2;
output_neurons = 1;
learning_rate = 0.1;
error_threshold = 0.01;
error = Inf;
while error > error_threshold
5. OUTPUT