pbaylies / stylegan-encoder

StyleGAN Encoder - converts real images to latent space
Other
740 stars 182 forks source link

Typo: features_weight.initializer is run twice #31

Closed oneiroid closed 4 years ago

oneiroid commented 4 years ago

https://github.com/pbaylies/stylegan-encoder/blob/18919c2565e3947eafc152e320ba573b3e61ad08/encoder/perceptual_model.py#L125

Hey, seems like ref_img_features remain uninitialized, featuresweight inited twice instead. PS: If corrected - the first iteration yelds zero vgg loss, but that might be because I messed something else (trying to use facenet instead of vgg). but might be not **

pbaylies commented 4 years ago

I'm not sure if or why it needed to run twice, but this is at least an original bug/feature from @Puzer

See: https://github.com/Puzer/stylegan-encoder/blob/master/encoder/perceptual_model.py#L44