Puzer / stylegan-encoder

StyleGAN Encoder - converts real images to latent space
Other
1.07k stars 164 forks source link

Scaled loss / magic number #8

Open apisarek opened 5 years ago

apisarek commented 5 years ago

Hi! Great project :)

I would like to ask where does the scale in perceptual model loss come from. I mean that line: self.loss = tf.losses.mean_squared_error(self.features_weight * self.ref_img_features, self.features_weight * generated_img_features) / 82890.0

I tried 82890.0 to factorize it 2 * 3^3 * 5 * 307 to check if it's the size of output features or anything similar, but apparently no. Also I searched through all the Github to find exactly the same scale in other projects, but found no good match.

zhujiapeng commented 5 years ago

+1

aiueogawa commented 5 years ago

@Puzer +1

arunasank commented 4 years ago

Any luck here?

akshaysravindran commented 3 years ago

Confused by this as well. I could not find a good justification for this number or how the scale should change w.r.t. input or architectural changes. Any updates on this?