You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder how the geocross loss works to find the direction of updating the latent vector.
def _loss_geocross(self, latent, **kwargs):
if(latent.shape[1] == 1):
return 0
else:
X = latent.view(-1, 1, 18, 512)
Y = latent.view(-1, 18, 1, 512)
A = ((X-Y).pow(2).sum(-1)+1e-9).sqrt()
B = ((X+Y).pow(2).sum(-1)+1e-9).sqrt()
D = 2*torch.atan2(A, B)
D = ((D.pow(2)*512).mean((1, 2))/8.).sum()
return D
The text was updated successfully, but these errors were encountered:
You can check out Appendix B of the paper to learn more about the Cross Loss.
In short: StyleGAN uses a style vector $w \in \mathbb{R}^{512}$, which is then tiled, i.e. copied 18 times. This is used as the input of the synthesis network.
PULSE's optimization problem is seeking vectors $v_1, \dots, v_{18}\in \mathbb{R}^{512}$ that minimizes the loss given in eq (9). To enforce $v_1, \dots , v_{18}$ to be more similar, they add the Cross Loss to regularize towards that similarity condition. Since they optimize $v_1, \dots, v_{18}$ on the unit sphere (see the discussion in Section 3.2.), they define that loss as the geodesic distance, which is why they coin it Geo Cross Loss.
I wonder how the geocross loss works to find the direction of updating the latent vector.
The text was updated successfully, but these errors were encountered: