mi_train_BP function

Train a three layers neural network model.