@Mengran_Wang Have you found a solution to this issue? I am facing the same problem and it looks like most of the answers here don’t directly give a solution.
A workaround I am using for the moment is to feed my network with the single sample repeated batch_size amount of times… Surely there is a better way!?