Do batch learning