lia icon indicating copy to clipboard operation
lia copied to clipboard

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

Open JanineCHEN opened this issue 5 years ago • 4 comments
trafficstars

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 avatar Oct 26 '20 15:10 JanineCHEN

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

zhujiapeng avatar Oct 28 '20 02:10 zhujiapeng

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

Thank you! I will take a look. :)

JanineCHEN avatar Oct 28 '20 10:10 JanineCHEN

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!

JanineCHEN avatar Nov 05 '20 07:11 JanineCHEN

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.

zhujiapeng avatar Nov 06 '20 06:11 zhujiapeng