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

关于 dense relation distill module #25

Open
Saralyliu opened this issue Jul 5, 2023 · 0 comments
Open

关于 dense relation distill module #25

Saralyliu opened this issue Jul 5, 2023 · 0 comments

Comments

@Saralyliu
Copy link

Saralyliu commented Jul 5, 2023

def forward(self,features,attentions):
    features = list(features)
    if isinstance(attentions,dict):
        for i in range(len(attentions)):
            if i==0:
                atten = attentions[i].unsqueeze(0)
            else:
                atten = torch.cat((atten,attentions[i].unsqueeze(0)),dim=0)
        attentions = atten.cuda()
    output = []
    h , w = attentions.shape[2:]
    ncls = attentions.shape[0]       
    key_t = self.key_t(attentions)   
    val_t = self.value_t(attentions) 
    for idx in range(len(features)):

我想知道谁是support ,谁是query?按代码的意思,是attentions是support,features是query是这样吗?
attentions和features的维度分别是多少?
期待您的回复,谢谢!

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

1 participant