byol-pytorch icon indicating copy to clipboard operation
byol-pytorch copied to clipboard

Why the loss is different from BYOL authors'

Open Jing-XING opened this issue 2 years ago • 2 comments

I found the loss is different from the loss said in BYOL paper which should be a L2 loss and I did't find explanation... The loss in this repo is a cosine loss, and I just want to know why. BTW, thanks for this great repo!

Jing-XING avatar Apr 23 '22 20:04 Jing-XING

if you read section J.3 in the paper, the code is identical

lucidrains avatar Apr 23 '22 22:04 lucidrains

if you read section J.3 in the paper, the code is identical

Thanks for your reply! I see, after normalization the L2 loss is the same as cosine similarity

Jing-XING avatar Apr 23 '22 23:04 Jing-XING