Solved by Neofytos in post #2 
              
              
                I’ve found the error: I am using the “cpu” (i.e. device = torch.device(“cpu”)) and at the same time I am defining workers. 
Removing “num_workers=4” lifted the error