azadis / MC-GAN

Multi-Content GAN for Few-Shot Font Style Transfer at CVPR 2018
http://bair.berkeley.edu/blog/2018/03/13/mcgan/
Other
445 stars 125 forks source link

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

Open ramicetty opened 5 years ago

azadis commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Seems your latest code not working in GPU. :(

On Wed, Dec 26, 2018 at 1:37 PM Samaneh Azadi notifications@github.com 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 .

azadis commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

zijianh4 commented 5 years ago

@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 commented 5 years ago

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