torch.utils.data.DataLoader cantnot iter(dataloader)

I have loaded the data, and these are the parameters of the dataset, which can be read normally.
the dataloader I created, and you can also view its parameters.
The issue is:Once I iterate over this dataloader, the program freezes (without any errors or warnings, I can only restart the kernel). I tried to debug the program, but I couldn’t set breakpoints.

This is the runtime environment.with python 3.12 torch2.3 cuda121

and it also doesn’t work in python 3.8.
I hope someone can help me solve this problem. It has been bothering me for several days, and I have searched online for a long time without finding a similar issue.thanks

Dataloader uses multiprocessing (or something like that) which apparently doesn’t work on windows + jupyter. Try setting num workers to 0 in your dataloader