add ex4 for neural network learning