Using the steps from the README fails on Colab. Any idea what's going on? It seems like the pickled network it downloads doesn't match what it's expecting.
Using TensorFlow backend. Downloading http://d36zk2xti64re0.cloudfront.net/stylegan2/networks/stylegan2-ffhq-config-f.pkl ... done Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Compiling... Loading... Done. Setting up TensorFlow plugin "upfirdn_2d.cu": Preprocessing... Compiling... Loading... Done. Traceback (most recent call last): File "encode_images.py", line 79, in <module> main() File "encode_images.py", line 52, in main generator = Generator(Gs_network, args.batch_size, randomize_noise=args.randomize_noise) File "/content/stylegan2encoder/encoder/generator_model.py", line 35, in __init__ self.generator_output = self.graph.get_tensor_by_name('G_synthesis_1/_Run/concat:0') File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py", line 3783, in get_tensor_by_name return self.as_graph_element(name, allow_tensor=True, allow_operation=False) File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py", line 3607, in as_graph_element return self._as_graph_element_locked(obj, allow_tensor, allow_operation) File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py", line 3649, in _as_graph_element_locked "graph." % (repr(name), repr(op_name))) KeyError: "The name 'G_synthesis_1/_Run/concat:0' refers to a Tensor which does not exist. The operation, 'G_synthesis_1/_Run/concat', does not exist in the graph."
Using the steps from the README fails on Colab. Any idea what's going on? It seems like the pickled network it downloads doesn't match what it's expecting.
!python encode_images.py aligned_images/ generated_images/ latent_representations/
Using TensorFlow backend. Downloading http://d36zk2xti64re0.cloudfront.net/stylegan2/networks/stylegan2-ffhq-config-f.pkl ... done Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Compiling... Loading... Done. Setting up TensorFlow plugin "upfirdn_2d.cu": Preprocessing... Compiling... Loading... Done. Traceback (most recent call last): File "encode_images.py", line 79, in <module> main() File "encode_images.py", line 52, in main generator = Generator(Gs_network, args.batch_size, randomize_noise=args.randomize_noise) File "/content/stylegan2encoder/encoder/generator_model.py", line 35, in __init__ self.generator_output = self.graph.get_tensor_by_name('G_synthesis_1/_Run/concat:0') File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py", line 3783, in get_tensor_by_name return self.as_graph_element(name, allow_tensor=True, allow_operation=False) File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py", line 3607, in as_graph_element return self._as_graph_element_locked(obj, allow_tensor, allow_operation) File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py", line 3649, in _as_graph_element_locked "graph." % (repr(name), repr(op_name))) KeyError: "The name 'G_synthesis_1/_Run/concat:0' refers to a Tensor which does not exist. The operation, 'G_synthesis_1/_Run/concat', does not exist in the graph."