araffin / aae-train-donkeycar

Code used to train an augmented auto-encoder (aka denoising auto-encoder with more augmentations) for the DonkeyCar simulator.
https://araffin.github.io/talk/learning-race/
MIT License
43 stars 13 forks source link

Process spawning error on Windows #4

Open szgeri opened 2 years ago

szgeri commented 2 years ago

On windows, train_ae.py will display a process spawning related error, because on Windows, the subprocess will import the main module, and because of that, it'll also execute it.

Solution:

Put this line after the imports: if name == 'main':

and increase the indentation of the rest of the file.

I intentionally did not create a PR for this to not change the ownership of the whole code because of the required indentation.

araffin commented 2 years ago

Hello, thanks for reporting the issue, this code was only tested under linux, so not a surprise that things might need small adjustments for windows.

I intentionally did not create a PR for this to not change the ownership of the whole code because of the required indentation.

No worry about that, please go ahead for the PR ;)