xthan/VITON

Regarding vgg loss

akshay120860 opened this issue · 2 comments

in vgg19 loss your used some value ,I was wonder how did these values are taken , I gone to your paper , but there is no information regarding this
p1 = compute_error(vgg_real['conv1_2'],
vgg_fake['conv1_2']) / 5.3 * 2.5 # 12812864
p2 = compute_error(vgg_real['conv2_2'],
vgg_fake['conv2_2']) / 2.7 / 1.2 # 6464128
p3 = compute_error(vgg_real['conv3_2'],
vgg_fake['conv3_2']) / 1.35 / 2.3 # 3232256
p4 = compute_error(vgg_real['conv4_2'],
vgg_fake['conv4_2']) / 0.67 / 8.2 # 1616512
p5 = compute_error(vgg_real['conv5_2'],
vgg_fake['conv5_2']) / 0.16 # 88512
can your help about how did got this value 2.5 ,1.2 , 2.3 , 8.2 , p1-p4 ?

xthan commented

Hi, as mentioned in Sec 4.2: "λi in Eqn. 1 is chosen to scale the loss of each term properly [6]." In other words, you can first set all these λi to 1 and run the code for some epoch, and based on the resulting loss to set these λi to make all these losses have similar values. Similar magic numbers can be found in the code of [6]: https://github.com/CQFIO/PhotographicImageSynthesis/blob/master/demo_256p.py#L86

However, these numbers do not have a large impact on the result.

thanks for you for solid explanation