Skip to content
New issue

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

对compute_contra_memobank_loss中的困惑 #111

Open
huangluyao opened this issue Mar 10, 2023 · 6 comments
Open

对compute_contra_memobank_loss中的困惑 #111

huangluyao opened this issue Mar 10, 2023 · 6 comments

Comments

@huangluyao
Copy link

huangluyao commented Mar 10, 2023

关于选取的查询表征第182行,为什么选取的是 seg_feat_low_entropy_list[i]的表征?
这样是不是会导致只有前几个分割类别在学习?

@Haochen-Wang409
Copy link
Owner

不会,因为 seg_feat_low_entropy_list 在第 116 行是 append 的,因此只有当类别存在 query 的时候才会进行计算。

@huangluyao
Copy link
Author

你好,谢谢你的回复,可能我描述的不够详细,请允许我补充一下我困惑。

当时seg_feat_low_entropy_list它添加数据的时候,是在长度为num_segmnets的for循环中添加数据的,那len(seg_feat_low_entropy_list)等于num_segmnets 的。
而在选取表征查询的时候,是在长度为vaild_seg的for循环中。我的理解是,vaild_seg正常情况下是小于num_segments,这样就会导致第182行的seg_feat_low_entropy_list[i]很难获取到后面几类样本的数据。emm...我感觉是这样

@Haochen-Wang409
Copy link
Owner

似乎好像是的,我将尝试看看是否有出现这类情况。如果属实的话我将修改相应部分代码

@huangluyao
Copy link
Author

okok,看看呢,如果确实存在的话,期待你的更新

@kathyliu579
Copy link

你好,我也看了。我觉得这里是个bug。。。

@kathyliu579
Copy link

如果valid 只有7 那么一共21类。这个代码只能计算前面7类为anchor的对比学习。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants