implemented mini-batch training in offline manager