trainer = BackpropTrainer(net, ds, learningrate=0.001, momentum=0.99)
trainer.trainUntilConvergence(verbose=True, trainingData=trainingSet,
    validationData=ds, maxEpochs=10)
print('0,0->', net.activate([0, 0]))
print('0,1->', net.activate([0, 1]))
print('1,0->', net.activate([1, 0]))
print('1,1->', net.activate([1, 1]))
Neural Network training with PyBrain won't converge