Pass batch size in to constructor rather than getting it from configs as suggested by gdusbabek