Professional Documents
Culture Documents
Neural Network Implementation
Neural Network Implementation
70067110
#include <iostream>
int main()
0.4};
float sum = 0;
counter++)
if (inputs[counter]==1)
one++;
Abdullah Umer
70067110
else
zero++;
counter++)
sum+=inputs[counter]*weights[counter];
if (sum>treshold)
if (one>zero)
counter++)
if (inputs[counter]==1)
weights[counter]+=0.01;
else
weights[counter]-=0.01;
else
if (zero>one)
Abdullah Umer
70067110
counter++)
if (inputs[counter]==0)
weights[counter]+=0.01;
else
weights[counter]-=0.01;
counter++)