Added support for per-batch dropout.