Solved by SimonW in post #3 
              
              
                You can’t use CUDA with fork. But you can set the ctx for just one data loader by specifying multiprocessing_context='spawn' when creating the data loader.