'DataLoader worker (pid(s) 6576) exited unexpectedly

I got this error for the code

dataloader = DataLoader(dataset=dataset, batch-size = 4, shuffle = True, num_workers=1)



Solution 1:[1]

I decreased num_workers from 1 to 0 and it worked for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AMI