Hi @ptrblck. I’ve extracted all the code related to the issue into a couple of files. I unable to upload non-image files here. Is there somewhere else you would prefer I send you the files  (there are 2 python files - one is a custom batch sampler that I use and the other is the main file for my model)?