Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while run the 'encode_images.py' file #69

Open
garry-qualhon opened this issue Nov 9, 2021 · 0 comments
Open

Getting error while run the 'encode_images.py' file #69

garry-qualhon opened this issue Nov 9, 2021 · 0 comments

Comments

@garry-qualhon
Copy link

Hello there,

I am trying to the 'encode_images.py' file without any type of modification but it is not working as per the requirement. I had tried out lots of alternative solutions, which are not worked as well. I have cloned the code library from the following link :
"git clone https://github.com/Puzer/stylegan-encoder.git" and I also tried your Git repo file, and that is also not working. I am using the google colab notebook to run the code when I am trying to run the code by using command "!python encode_images.py aligned_images/ generated_images/ latent_representations/", it's throwing me the following error:

Traceback (most recent call last):
  File "encode_images.py", line 80, in <module>
    main()
  File "encode_images.py", line 51, in main
    generator_network, discriminator_network, Gs_network = pickle.load(f)
  File "/content/stylegan-encoder/dnnlib/tflib/network.py", line 298, in __setstate__
    self._init_graph()
  File "/content/stylegan-encoder/dnnlib/tflib/network.py", line 141, in _init_graph
    with tf.name_scope(None):
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py", line 6691, in __init__
    raise ValueError("name for name_scope must be a string.")
ValueError: name for name_scope must be a string.

Please let me know what code changes I have to do with my files? I am struggling with this issue from last 3-4 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant