Closed milktea-lab closed 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
Hi,SGenheden,thank you,I have solved my problem using your suggest. Have a nice day.
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"