Remove cache Prefetch or stop at certain step

I’m using 2 generator to generate input for each step and need to update input at certain training step, but prefetched data often get a bit messed up when changing input. I think of 2 way to solve problem:

  1. Remove data that has been called to input pipeline by prefetch (since I use generator and need to update input at certain training step)
  2. Stop prefetching when it prefetch enough data at training step k
    Is there any straight-forward way solve 1 of 2 problems above?

Hi @Dung_Anh_Hoang

Could you please provide us some more details on the issue along with the reproducible code to replicate and to understand the issue? Thank you.