add minibatch trainer and fix dropout bug