RudyMorel / scattering_spectra

Scattering Spectra used for the analysis and generation of time-series
MIT License
25 stars 8 forks source link

Added CUDA auto detect #12

Closed AiglonDore closed 7 months ago

AiglonDore commented 7 months ago

Current notebook would have CUDA forced on. However, when run on a non-CUDA machine, then the code would instantly fail. I added an instruction to automatically detect if CUDA is available.

AiglonDore commented 7 months ago

I also formatted the code using black

AiglonDore commented 7 months ago

When using plt.savefig, if the directory where the file will be written doesn't exist, then Python will raise a FileNotExistError. I added a detection if the directory exists. and if not, Python will create this directory to avoid any failures.

RudyMorel commented 7 months ago

Thanks for correcting this!