Dataloader problem in pyinstaller executable file

Has anyone ever built a PyTorch inference file with pyinstaller?

When iterating torch.utils.data.dataloader using enumerate, there was no problem when executing the Python file directly,

but if I build it as an executable file and run it, dataloader part is not executed and the executable file is restarted.

Hard to debug:(

Does anyone know a solution or has similar experience?

Thank ahead:)