Found error in for-loop and logical error in Learning constructor. Now the backpropagation works. Next is Hebb and Delta rule.