Thanks @ptrblck. So do you mean I cannot use batch training, but use the whole dataset as one batch? I think this is not what I want and will raise out of memory problem.
Sorry, I think I do not quite get your point.