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

Get the latent code of z/w space mapped using the encoder #2

Open
JanineCHEN opened this issue Oct 26, 2020 · 4 comments
Open

Get the latent code of z/w space mapped using the encoder #2

JanineCHEN opened this issue Oct 26, 2020 · 4 comments

Comments

@JanineCHEN
Copy link

JanineCHEN commented Oct 26, 2020

Hi, thank you for this great work! @zhujiapeng

I would like to know if there is a straightforward way to get the latent code mapped from the real input image to the z/w space using the well-trained encoder, any insights would be highly appreciated!

@JanineCHEN JanineCHEN changed the title The latent code z/w from the encoder Get the latent code of z/w space mapped using the encoder Oct 26, 2020
@zhujiapeng
Copy link
Collaborator

You can refer to lines 80 and 81 in interpolate.py.

@JanineCHEN
Copy link
Author

You can refer to lines 80 and 81 in interpolate.py.

Thank you! I will take a look. :)

@JanineCHEN
Copy link
Author

JanineCHEN commented Nov 5, 2020

You can refer to lines 80 and 81 in interpolate.py.

Hi @zhujiapeng , it turns out that getting the intermediate tensor output is not that straightforward (I am not that familiar with tensorflow1.X, which makes it quite difficult for me to amend the code), I would highly appreciate it if you could share a sample script for how to extract the intermediate latent code tensor as numpy arrays for instance.

Great thanks in advance!

@zhujiapeng
Copy link
Collaborator

zhujiapeng commented Nov 6, 2020

Sorry, I am a little busy those days and do not have time to do this. But you could refer to interpolate.py scripts, lines 107 and 108 get the numpy outputs of latent z, and lines 138 and 139 get the numpy outputs of latent w.

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

2 participants