Skip to content

The implementation of CLIP-NCE inconsistent with paper? #2

Description

@elliottzheng

According to the paper, the CLIP-NCE loss is like
image
there should be two positive terms in the denominator, while in the code

return self.InfoNCE(query.repeat(2,1), torch.cat([pos1_direction,pos2_direction], 0), neg_direction)

if I understand correctly, there will be only one positive term in the denominator (as the two positive is separately considered as different batch), which seems inconsistent.

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