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

Example do not start on CPU #15

Closed spartedo closed 5 years ago

spartedo commented 5 years ago

Can't start example:

root@ubuntu:~/experiment/SC-FEGAN-master# python3 demo.py
Traceback (most recent call last):
  File "demo.py", line 11, in <module>
    from model import Model
  File "/root/experiment/SC-FEGAN-master/model.py", line 4, in <module>
    from ops import *
  File "/root/experiment/SC-FEGAN-master/ops.py", line 9
    """
      ^
SyntaxError: invalid syntax

I am running via CPU:

root@ubuntu:~/experiment/SC-FEGAN-master# cat demo.yaml
INPUT_SIZE: 512
BATCH_SIZE: 1

#GPU_NUM: 1

# directories
CKPT_DIR: './ckpt/SC-FEGAN.ckpt'
spartedo commented 5 years ago

I am running components version:

Ubuntu 18.04.2 LTS
Python 3.6.7
tensorflow (1.12.0)
numpy (1.16.1)
opencv-python (4.0.0.21)
PyYAML Version: 3.12
PyQt5 Version: 5.12
anatoly-kor commented 5 years ago

@spartedo I have the same problem. Try just to remove the multi-line comment in line 9 of file ops.py.

vikasTmz commented 5 years ago

Commenting out GPU_NUM to use cpu will return a KeyError in SC-FEGAN/utils/config.py, line 21. So just remove the number specified after GPU_NUM.

Then merge this pr to solve invalid syntax issue.

spartedo commented 5 years ago

Thank you, removing multiline comment and

GPU_NUM:

in demo.yaml helped me.