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

如何训练yolov_x_online的模型 #92

Open
Eudian opened this issue Aug 6, 2024 · 4 comments
Open

如何训练yolov_x_online的模型 #92

Eudian opened this issue Aug 6, 2024 · 4 comments

Comments

@Eudian
Copy link

Eudian commented Aug 6, 2024

试了yolov_l_online, yolov_s_online的训练都跑不起来。

@YuHengsss
Copy link
Owner

These files are used for inferencing, please use config like yolov_l or yolov_s for training!

@Eudian
Copy link
Author

Eudian commented Aug 6, 2024

So train with yolov_x.py, and inferencing with yolov_x_online.py, it goes in this way?

@YuHengsss
Copy link
Owner

YuHengsss commented Aug 6, 2024 via email

@Johnny-Lin
Copy link

class MSA_yolov_online(nn.Module):

def __init__(self, dim,out_dim, num_heads=4, qkv_bias=False, attn_drop=0.,scale=25):
    super().__init__()
    self.msa = Attention_msa_online(dim,num_heads,qkv_bias,attn_drop,scale=scale)
    self.linear1 = nn.Linear(2 * dim,2 * dim)
    self.linear2 =  nn.Linear(4 * dim,out_dim)

def ave_pooling_over_ref(self,features,sort_results):
    key_feature = features[0]
    support_feature = features[0]
    if not self.training:
        sort_results = sort_results.to(features.dtype)
    soft_sim_feature = (sort_results@support_feature)#.transpose(1, 2)#torch.sum(softmax_value * most_sim_feature, dim=1)
    cls_feature = torch.cat([soft_sim_feature,key_feature],dim=-1)

    return cls_feature

那这里推理用到的参数是怎么来的 ?

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