adds support for specifiying batch size for each grid

I did a quick implementation of the batch_size option, related to #81.
Let me know what you think.