YipengHu / COMP0090

UCL Module: Introduction to Deep Learning
Apache License 2.0
34 stars 28 forks source link

PyTorch Implementation Unsupported on Windows #7

Closed greenfrogs closed 3 years ago

greenfrogs commented 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).

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

YipengHu commented 3 years ago

@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 ;)