fixed a bug in mnist_train_nonstatinary that caused NAN in the network