I was trying to implement StyleGAN on my local system and was not able to run because of invalid syntax in the __init__.py
file.
submit_config: SubmitConfig = None # Package level variable for SubmitConfig which is only valid when inside the run function.
This line is after all the imports and I am unsure if I must make changes to the official code or if I am missing a dependency. The __init__.py
file can be found here.
It's called type annotations and it was introduced in Python3.6.
This PEP aims at adding syntax to Python for annotating the types of variables (including class variables and instance variables), instead of expressing them through comments:
primes: List[int] = [] captain: str # Note: no initial value! class Starship: stats: ClassVar[Dict[str, int]] = {}
The StyleGAN System Requirements does mention that they require a Python3.6 installation.
- 64-bit Python 3.6 installation. We recommend Anaconda3 with numpy 1.14.3 or newer.