lightweight-gan icon indicating copy to clipboard operation
lightweight-gan copied to clipboard

cpu training possible?

Open jeremy-rutman opened this issue 3 years ago • 3 comments

I have some cloud servers with idle cpu , is it possible to run this without gpu? I don't see any such params in cli.py. There's an assert for gpu availability but its not clear to me how vital that is down the road.

jeremy-rutman avatar Oct 24 '21 16:10 jeremy-rutman

Considering that the line AssertionError: You need to have an Nvidia GPU with CUDA installed. popped up in PowerShell for me after I tried to run a command, I'd say that you can't, unless there's a working fork of this that someone made that does. Otherwise, contact the dev directly and/or wait.

tristanbay avatar Jan 16 '22 09:01 tristanbay

Changing device("gpu") to device("cpu") and .cuda(...) to .cpu() should work. Also you can remove the asserts related to GPU.

See https://github.com/gigaturbo/lightweight-gan-cpu.git

gigaturbo avatar Jun 27 '22 16:06 gigaturbo

Changing device("gpu") to device("cpu") and .cuda(...) to .cpu() should work. Also you can remove the asserts related to GPU.

See https://github.com/gigaturbo/lightweight-gan-cpu.git

Hello @gigaturbo, I tried your fork, but upon executing it I get the following error:

$ python lightweight_gan/lightweight_gan.py --data ../filtered_dataset --image-size 1024
Traceback (most recent call last):
  File "lightweight_gan/lightweight_gan.py", line 27, in <module>
    from lightweight_gan.diff_augment import DiffAugment
  File "/home/giacomo/lightweight-gan-cpu/lightweight_gan/lightweight_gan.py", line 27, in <module>
    from lightweight_gan.diff_augment import DiffAugment
ModuleNotFoundError: No module named 'lightweight_gan.diff_augment'; 'lightweight_gan' is not a package

Executing $ pip install lightweight-gan did not solve the problem. What am I doing wrong? Thank you for your help,

GTP

GTP95 avatar Oct 07 '22 19:10 GTP95