run-youngjoo / SC-FEGAN

SC-FEGAN : Face Editing Generative Adversarial Network with User's Sketch and Color (ICCV2019)
Other
3.35k stars 530 forks source link

Commenting out GPU_NUM leads to key error #9

Closed cfrancesco closed 5 years ago

cfrancesco commented 5 years ago

After commenting out GPU_NUM in demo.yaml, this happens:

Traceback (most recent call last): File "demo.py", line 230, in os.environ["CUDA_VISIBLE_DEVICES"] = str(config.GPU_NUM) File "/Users/francesco.cardinale/forge/SC-FEGAN/utils/config.py", line 21, in getattr value = self._cfg_dict[name] KeyError: 'GPU_NUM'

Instead of commenting the line as in the readme, setting it to 0 works just fine

run-youngjoo commented 5 years ago

I made GPU mode selection by 'CUDA_VISIBLE_DEVICES' env value. Simply, the tensorflow works with CPU when CUDA_VISIBLE_DEVICES=''. So, if you want to use the only CPU, just erase the only number. The key name 'GPU_NUM' have to be remained.