MolecularAI / aizynthfinder

A tool for retrosynthetic planning
https://molecularai.github.io/aizynthfinder/
MIT License
571 stars 130 forks source link

about gpu #75

Closed milktea-lab closed 2 years ago

milktea-lab commented 2 years ago

how can i use gpu to train my models? Do I need to modify it in the source code(keres_model.py)? like this: import os os.environ["CUDA_VISIBLE_DEVICES"] = "0"

SGenheden commented 2 years ago

Hello. You shouldn't need to modify the source code to utilize your GPUs. What you suggested would be accomplishable by setting the environmental variable in the shell. It doesn't need to be done in python. With that said, it is usually not trivial to get Tensorflow to work with your GPUs (at least not as trivial as with pytorch). You need install cuda libraries and make them support your GPU. Here is a guide that might be helpful for you: https://towardsdatascience.com/the-ultimate-tensorflow-gpu-installation-guide-for-2022-and-beyond-27a88f5e6c6e

milktea-lab commented 2 years ago

Hi,SGenheden,thank you,I have solved my problem using your suggest. Have a nice day.