I work on a simple neural network for the detection of the forms, here is all the code on github: https://github.com/stodar/shapes/blob/main/saad.ipynb .
I get the same result even when I change the inputs, I redid the code several times but no result.
please do you have any idea?
corrects, wrongs = 0, 0
print('Target', ' Predicted', ' %')
for i in range(len(x_test)):
input_vector = np.array(x_test[i], ndmin=2).T
output_vector = np.dot(wh, input_vector)
output_vector = sigmoid(output_vector)
output_vector = np.dot(wo, output_vector)
res = sigmoid(output_vector)
#Evaluate Model
res_max = res.argmax()
e = np.array(res_max)
e = np.eye(3)[res_max]
e.astype('int32')
if np.array_equal(e,y_test[i]) :
corrects += 1
else:
wrongs += 1
print(y_test[i], ' ',e, ' ', np.max(res))
print("accuracy:", corrects / ( corrects + wrongs))
```