Skip to content

Commit 789a602

Browse files
authored
Update instance_loss.py
1 parent 266a96c commit 789a602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

instance_loss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, gamma = 1) -> None:
1616

1717
def forward(self, feature, label = None) -> Tensor:
1818
# Dual-Path Convolutional Image-Text Embeddings with Instance Loss, ACM TOMM 2020
19-
# https://arxiv.org/abs/1711.05535
19+
# https://zdzheng.xyz/files/TOMM20.pdf
2020
# using cross-entropy loss for every sample if label is not available. else use given label.
2121
normed_feature = l2_norm(feature)
2222
sim1 = torch.mm(normed_feature*self.gamma, torch.t(normed_feature))

0 commit comments

Comments
 (0)