aspuru-guzik-group / chemical_vae

Code for 10.1021/acscentsci.7b00572, now running on Keras 2.0 and Tensorflow
Apache License 2.0
470 stars 178 forks source link

GPU Support #44

Closed amirnikooie closed 2 years ago

amirnikooie commented 2 years ago

Does this package support GPU for training and if yes, how can we set that up?

I found the following code on top of the 'train_vae.py' file, but they were commented and so not used. Also there were no more information about it in the documentation. So, overall it was vague and I was not sure if GPU is supported.

from gpu_utils import pick_gpu_lowest_memory
gpu_free_number = str(pick_gpu_lowest_memory())
#
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '{}'.format(gpu_free_number)

Thank you in advance!