MaximeVandegar / Papers-in-100-Lines-of-Code

Implementation of papers in 100 lines of code.
MIT License
646 stars 94 forks source link

Update kplanes.py - Add "__main__" and device= cpu #17

Closed Mayureshd-18 closed 8 months ago

Mayureshd-18 commented 8 months ago

If this works, I would like to add the try except suite in every code. Regards

MaximeVandegar commented 8 months ago

Hi, thank you for the pull request.

This is a great idea, but I would prefer a cleaner solution such as:

device = ‘cuda’ if torch.cuda.is_available() else ‘cpu’