Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Running on GPU - VM instance #34

Closed
amarek1 opened this issue Aug 25, 2019 · 4 comments
Closed

Question: Running on GPU - VM instance #34

amarek1 opened this issue Aug 25, 2019 · 4 comments
Labels
question Further information is requested

Comments

@amarek1
Copy link

amarek1 commented Aug 25, 2019

Hello,
I am trying to run my TGAN on a Google VM instance with 1 GPU. I am passing an argument 'gpu=0' or 'gpu='0'' to my TGANModel() but it keeps running on CPU rather than GPU. Could you please let me know what I might be doing wrong, is running on GPU supported while just passing a gpu argument or is there something else I should be doing to enable it?
Thank you

from tgan.model import TGANModel
tgan = TGANModel(continuous_columns=continuous, output='tGAN/', gpu=0, max_epoch=1, steps_per_epoch=6000, save_checkpoints=True,
                 restore_session=True, batch_size=256, z_dim=200, noise=0.2, l2norm=0.00001, learning_rate=0.001,
                 num_gen_rnn=100, num_gen_feature=100, num_dis_layers=1, num_dis_hidden=100, optimizer='AdamOptimizer')
tgan.fit(data)
tgan.save(model_path, force=True)
@amarek1 amarek1 changed the title Running on GPU - VM instance Question: Running on GPU - VM instance Aug 29, 2019
@csala
Copy link
Contributor

csala commented Sep 16, 2019

Hi @amarek1 this gpu argument was left from the first implementation, but it is not being used for anything a.t.m.

It was left there because it will be used again once we re-enable the Multi-GPU support (please check #21)

In the meantime, in order to run the project on a single GPU, all you need to do is to manually remove tensorflow and install tensorflow-gpu after installing tgan:

pip install tgan
pip uninstall tensorflow
pip install "tensorflow-gpu>=1.13.0,<2.0"

@csala csala closed this as completed Sep 16, 2019
@csala csala added the question Further information is requested label Sep 16, 2019
@amarek1
Copy link
Author

amarek1 commented Oct 4, 2019

Thank you very much for your help, it works now.

@csala csala pinned this issue Oct 4, 2019
@leoAshu
Copy link

leoAshu commented Apr 2, 2020

I have tensorflow-gpu = 1.15.2
CUDA = 10.1 and corresponding cudnn
Upon running the tgan model, it still is using the CPU

Also, I have manually uninstalled tensorflow

Code:

from tgan.model import TGANModel
tgan = TGANModel(continuous_columns)
tgan.fit(data)

@afshinmarani
Copy link

I have tensorflow-gpu = 1.15.2
CUDA = 10.1 and corresponding cudnn
Upon running the tgan model, it still is using the CPU

Also, I have manually uninstalled tensorflow

Code:

from tgan.model import TGANModel
tgan = TGANModel(continuous_columns)
tgan.fit(data)

Were you able to solve your problem?

@fealho fealho unpinned this issue Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants