Broken pipe error in Windows

I am getting broken pipe error in windows 10 when num_workers>0 in data loader. I have searched for the solution in many places. Everywhere it is said that keep everything under if name==‘main’ : block.
I have tried in every way but still getting the same error. Attached the code. Though I have 2 gpu but num_workers=0 really slowing my training down. Thanks in adva