thuanz123 / realfill

Unofficial implementation of RealFill
MIT License
360 stars 27 forks source link

The Loss calculation is always 0 #23

Closed yjyuanjin closed 4 months ago

yjyuanjin commented 4 months ago

According to the paper, the loss of the reference image needs to be calculated in full, and the loss of the target image only calculates the area that is not masked. In the program, all weighting values ​​are 0. In fact, weights need to be all 1 in the reference image and 1 in the target image where mask=0.

thuanz123 commented 4 months ago

I admit that the code is a bit weird but weighting is correct and you can take a look at #12 to see more in detail about the weighting