nerdyrodent / VQGAN-CLIP

Just playing with getting VQGAN+CLIP running locally, rather than having to use colab.
Other
2.59k stars 428 forks source link

clip loss #167

Open RainGameon opened 8 months ago

RainGameon commented 8 months ago

why do we use arcsin to computer cosine loss? codes is like following: dists = input_normed.sub(embed_normed).norm(dim=2).div(2).arcsin().pow(2).mul(2)