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

Training an encoder using pretrained StyleGAN #45

Closed
basitanees opened this issue May 6, 2021 · 2 comments
Closed

Training an encoder using pretrained StyleGAN #45

basitanees opened this issue May 6, 2021 · 2 comments

Comments

@basitanees
Copy link

Hi,

I wanted to ask if there are any pretrained models linked with this repository that do not include the encoder. The one linked with the repository readme ("styleganinv_face_256.pkl") has an encoder as well and when I use it for the train_encoder,py script, it unpacks 4 values (E, G, D, Gs) whereas in the code (training_loop_encoder.py - line 122), it expects 3 values (G,D,Gs). I fixed it by changing training_loop_encoder.py - line 122
from:
G, D, Gs = misc.load_pkl(decoder_pkl.decoder_pkl)
to:
_, G, D, Gs = misc.load_pkl(decoder_pkl.decoder_pkl)

However, I am not sure if there are other models available that fit with the original code. I would appreciate any comments regarding this. Thank you.

@zhujiapeng
Copy link
Collaborator

The "styleganinv_face_256.pkl" file contains the encoder we have already trained. If you want a model with three values (G, D, Gs), you could train it yourself following the instruction in README.md.

捕获

@basitanees
Copy link
Author

Thank you.

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