How to prefetch data using a custom python function in tensorflow How to prefetch data using a custom python function in tensorflow multithreading multithreading