Skip to content

SWAV Loss function #5

@wallaceloos

Description

@wallaceloos

Hello,

Congratulation for this great work. I have a question regarding the loss function from SWAV.


def cross_entropy_loss(q, p): 
   return torch.mean(torch.sum(q * F.log_softmax(p, dim=1), dim=1))

That F.log_softmax will return a negative number. Should it be -F.log_softmax(p, dim=1)?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions