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

How can i run code in CPU machine? what are the changes required? #8

Open
ramicetty opened this issue Dec 23, 2018 · 9 comments
Open

Comments

@ramicetty
Copy link

No description provided.

@azadis
Copy link
Owner

azadis commented Dec 23, 2018

you should be able to run it with cpu if you make the following changes to the bash script. In https://github.com/YuSuen/MC-GAN/blob/master/scripts/train_StackGAN.sh#L68, erase CUDA_VISIBLE_DEVICES=${CUDA_ID} part and add --gpu_ids '' in the end.

@ramicetty
Copy link
Author

Seems we can't pass empty string as gpu_ids.
File "MC-GAN/options/base_options.py", line 79, in parse
id = int(str_id)
ValueError: invalid literal for int() with base 10: ''

@azadis
Copy link
Owner

azadis commented Dec 26, 2018

yes, please consider my latest commit with a change in the following line:
https://github.com/azadis/MC-GAN/blob/master/options/base_options.py#L78

@ramicetty
Copy link
Author

ramicetty commented Dec 26, 2018 via email

@azadis
Copy link
Owner

azadis commented Jan 16, 2019

Sorry, fixed now!
for running with cpu you should make the following changes to the bash script. In https://github.com/YuSuen/MC-GAN/blob/master/scripts/train_StackGAN.sh#L68, erase CUDA_VISIBLE_DEVICES=${CUDA_ID} part and add --gpu_ids ' ' in the end.

@zijianh4
Copy link

zijianh4 commented Mar 4, 2019

Sorry, fixed now!
for running with cpu you should make the following changes to the bash script. In https://github.com/YuSuen/MC-GAN/blob/master/scripts/train_StackGAN.sh#L68, erase CUDA_VISIBLE_DEVICES=${CUDA_ID} part and add --gpu_ids ' ' in the end.

I have just done that. However, it has a strange error, which is 'unrecognized arguments: batch'. I don't understand why this argument may have problems.
Thanks.
image
image

@ramicetty
Copy link
Author

@overexposed for me working fine. Sorry i tried to solve your problem. but no luck.:(

@zijianh4
Copy link

zijianh4 commented Mar 4, 2019

@overexposed for me working fine. Sorry i tried to solve your problem. but no luck.:(

It seems that the program does not understand the 'NORM=batch' argument, which is really strange.

@zijianh4
Copy link

zijianh4 commented Mar 5, 2019

@overexposed for me working fine. Sorry i tried to solve your problem. but no luck.:(

Oh, I fixed it. It is just because ${PRENET}\ in the above line should be ${PRENET} \ with a space.:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants