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

关于统计移动平均特征的代码问题 #35

Open
Kittywyk opened this issue Dec 17, 2021 · 1 comment
Open

关于统计移动平均特征的代码问题 #35

Kittywyk opened this issue Dec 17, 2021 · 1 comment

Comments

@Kittywyk
Copy link

Kittywyk commented Dec 17, 2021

您好,首先非常感谢您solid的工作。

但在我看具体代码时,有一些问题想要请教:

在 lvis1.0\mmdet\models\roi_heads\bbox_heads\convfc_bbox_head.py 文件中的 update_embed 函数里:

        if self.training:
            # remove background
            with torch.no_grad():
                fg_target = targets[gt_label > 0].clone().detach().mean(0, keepdim=True)   
                self.causal_embed = self.MU * self.causal_embed + fg_target    
        return

就我理解而言,这里是给滑动平均值加上了特征图的(fg_target)的数值,而非梯度值,与下图式中的 g_t 不符。请问是我对代码的理解有误吗?可否指正一下,非常感谢!
image

@Itsanewday
Copy link

我觉得这里的causal_embed 应该对应为论文的
image
你再看看论文

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

2 participants