Good to hear it’s working now.
However, I would assume you’ll get a proper error running your code with num_workers=0.
This should only be for debugging purposes as you are now using the main thread to load the data which might slow down your training.
Did you try to add the if-clause protection and use multiple workers?