# Neural Network is not learning a very simple task

I am a complete beginner in the area. I implemented my first neural network following the online book "Neural Networks and Deep Learning" by Micheal Nielsen. It works fine with classifying handwritten digits. Achieving ~9500/10000 accuracy on the test data. I am trying to train the network to determine whether $$x > 5$$ where $$x$$ is in the interval $$[0,10)$$, which should be a much simpler task than classifying handwritten digits. However, no learning happens and the accuracy ever the test data stays exactly the same with every epoch. I tried different structures and different learning rates but always the same thing happened. Here is the code I wrote that uses libraries in Nielsen's book:

import networkCopy
import numpy as np
# Creating training data
x = []
y = []
for n in range(1000):
training_data = zip(x, y)
# Creating test data
tx = []
ty = []
for n in range(1000):

• I don’t understand the point of your task. If you have got it to predict the digit already then why not just add some code that takes the predicted digit and returns prediction > 5? – David Ireland Jul 9 at 20:23