You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each domain, we use the corresponding encoder to extract the latent embeddings. For each image in domain X1, we find the nearest neighbors in domain X2 by calculating the cosine distances between the flattened embeddings.
How to implement this part with code?
Thank you!
The text was updated successfully, but these errors were encountered:
That part is a proof of concept showing that the latent space is shared among two domains. I did not release that part because the code was quite messy. What you can do is: you can modify inference/image_translation_infer.py to get the latent embedding tensor. (See the encoder output in nets/pggan.py, and try to find the name of the tensor op here: end_points['before_classification'] = net)
Replace FLAGS.output_tensor_name with the tensor name you found.
# Get input and output tensors
self.output = tf.get_default_graph().get_tensor_by_name(FLAGS.output_tensor_name)
After that, save the embedding for each image and do nearest neighbor search using scipy.
For each domain, we use the corresponding encoder to extract the latent embeddings. For each image in domain X1, we find the nearest neighbors in domain X2 by calculating the cosine distances between the flattened embeddings.
How to implement this part with code?
Thank you!
The text was updated successfully, but these errors were encountered: