Added trainig by epoch