Solved by ptrblck in post #2 
              
              
                You could probably create an internal attribute in your Dataset's __init__ and manipulate this attribute inside the training loop via: loader.dataset.my_flag = my_value. 
This .my_flag could be checked in __getitem__. 
However, if I’m not mistaken, this will only work using a single process. 
For mu…