We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
作者您好,我对contrastive_training.py代码中info_nce_logits中存疑,本人是刚刚入门的菜鸟,如有冒犯还请见谅! 在函数info_nce_logits中,最后对labels的赋值为什么全部为0了呢?【labels = torch.zeros(logits.shape[0], dtype=torch.long).to(device)】 我理解是正样本对的标签为1,负样本对的标签为0,但是函数最后返回的labels全为0,这里是不是应该改一下呀,还是说我理解错了,这里的设计有别的含义? 请您多多指教~
The text was updated successfully, but these errors were encountered:
您好,我看到了您之前问的关于info_nce_logits中labels的赋值全部为0的问题,我也没有搞清楚,不知道您现在是否有新的见解?盼望您的答复! # @HapuHXY
Sorry, something went wrong.
https://blog.csdn.net/weixin_43427721/article/details/134539003
https://blog.csdn.net/qq_39815859/article/details/144697605?sharetype=blogdetail&sharerId=144697605&sharerefer=PC&sharesource=qq_39815859&spm=1011.2480.3001.8118 这两篇博客写的还不错,我觉得可以帮助理解代码,可以看一下,欢迎交流!
No branches or pull requests
作者您好,我对contrastive_training.py代码中info_nce_logits中存疑,本人是刚刚入门的菜鸟,如有冒犯还请见谅!
在函数info_nce_logits中,最后对labels的赋值为什么全部为0了呢?【labels = torch.zeros(logits.shape[0], dtype=torch.long).to(device)】
我理解是正样本对的标签为1,负样本对的标签为0,但是函数最后返回的labels全为0,这里是不是应该改一下呀,还是说我理解错了,这里的设计有别的含义?
请您多多指教~
The text was updated successfully, but these errors were encountered: