Closed greenfrogs closed 3 years ago
The current PyTorch implementations provided under img_cls (and probably face_gan but untested) do not work out of the box on Windows as there is no if clause protection for multiprocessing (https://pytorch.org/docs/stable/notes/windows.html#usage-multiprocessing).
img_cls
face_gan
This can quickly be patched by wrapping the code with a if __name__ == '__main__': to prevent it from executing multiple times.
if __name__ == '__main__':
Tested on Python 3.8, PyTorch 1.9.1, CudaToolkit 11.1.1
@greenfrogs the patch seems general enough. Thanks! If you PR, i will have a look and merge, even though we do not support Windows offcially ;)
The current PyTorch implementations provided under
img_cls
(and probablyface_gan
but untested) do not work out of the box on Windows as there is no if clause protection for multiprocessing (https://pytorch.org/docs/stable/notes/windows.html#usage-multiprocessing).This can quickly be patched by wrapping the code with a
if __name__ == '__main__':
to prevent it from executing multiple times.Tested on Python 3.8, PyTorch 1.9.1, CudaToolkit 11.1.1