MC-GAN icon indicating copy to clipboard operation
MC-GAN copied to clipboard

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

Open ramicetty opened this issue 6 years ago • 9 comments

ramicetty avatar Dec 23 '18 09:12 ramicetty

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.

azadis avatar Dec 23 '18 14:12 azadis

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: ''

ramicetty avatar Dec 26 '18 03:12 ramicetty

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

azadis avatar Dec 26 '18 08:12 azadis

Seems your latest code not working in GPU. :(

On Wed, Dec 26, 2018 at 1:37 PM Samaneh Azadi [email protected] wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/azadis/MC-GAN/issues/8#issuecomment-449925616, or mute the thread https://github.com/notifications/unsubscribe-auth/ALDyqrNJd-QrGD9QsYJZTj03JXP9lOcwks5u8y45gaJpZM4ZfxKW .

ramicetty avatar Dec 26 '18 08:12 ramicetty

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.

azadis avatar Jan 16 '19 02:01 azadis

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

zijianh4 avatar Mar 04 '19 00:03 zijianh4

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

ramicetty avatar Mar 04 '19 01:03 ramicetty

@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 avatar Mar 04 '19 22:03 zijianh4

@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.:)

zijianh4 avatar Mar 05 '19 19:03 zijianh4