stylegan-encoder
stylegan-encoder copied to clipboard
error while running encode.py
Facing this error
Traceback (most recent call last):
File "encode_images.py", line 80, in
I could fix this issue by going back to using tensorflow-gpu==1.14
Hi, After installing tensorflow-gpu==1.14 I am getting error as follows. I am executing in Google Colab.
InvalidArgumentError: Cannot assign a device for operation learnable_dlatents/read: node learnable_dlatents/read (defined at /content/stylegan-encoder/encoder/generator_model.py:15) was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0, /job:localhost/replica:0/task:0/device:XLA_GPU:0 ]. Make sure the device specification refers to a valid device. [[learnable_dlatents/read]]
Any suggestions Please. Ty!
Hi, After installing tensorflow-gpu==1.14 I am getting error as follows. I am executing in Google Colab.
InvalidArgumentError: Cannot assign a device for operation learnable_dlatents/read: node learnable_dlatents/read (defined at /content/stylegan-encoder/encoder/generator_model.py:15) was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0, /job:localhost/replica:0/task:0/device:XLA_GPU:0 ]. Make sure the device specification refers to a valid device. [[learnable_dlatents/read]]
Any suggestions Please. Ty!
I am getting the same error in Colab. Were you able to fix the issue?
I am getting the same error in Colab. Were you able to fix the issue?
No. It seems like problem with colab GPU. It's working in other GPU by installing tenforflow-gpu==1.14 at start without importing any libraries.
I hope it helps.
Seems working for me with tensorflow-gpu==1.14 in Colab GPU runtime.
Seems working for me with tensorflow-gpu==1.14 in Colab GPU runtime.
Like Radeeswar and taniyaghosh29 I cannot make it work in Colab either. Did you do anything extra to make it work in Colab with tensorflow-gpu==1.14?
Edit: Made it work. My error was to use tensorflow==1.14, instead of tensorflow-gpu==1.14
I remove all tensorflow pkg and do pip3 install tensorflow-gpu==1.14 --user
this problem still exists.
I add allow_soft_placement
to gpu config and didn't solve this problem.