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

the code with czsl #19

Open
Jianghao-Li opened this issue Dec 5, 2022 · 3 comments
Open

the code with czsl #19

Jianghao-Li opened this issue Dec 5, 2022 · 3 comments

Comments

@Jianghao-Li
Copy link

Sorry to bother, i don't know how you insert batchformer to czsl tasks, could you please tell me more details? Thanks

@zhihou7
Copy link
Owner

zhihou7 commented Dec 5, 2022

Hi @liccoco, I mainly change the code in two parts:

  1. batchformer:
    def forward_feats(self, feature):
    ,
    model = TransformerDecorator(model, args.model, args.add_bt)
  2. repeat corresponding labels
    if self.add_bt >= 1:

Besides, I choose a smaller lr (--lrb) for batchformer module because the network is quite small for cgqa.

Feel free to ask if you have any questions.

Regards,
Zhi Hou

@Jianghao-Li
Copy link
Author

Thanks for your reply. I found the code on github is different from the code in your paper, such as batchv1. The code in your paper
image
i didn't find the module appear in your real code, could you please explain the meaning of y in your paper? Thanks

@zhihou7
Copy link
Owner

zhihou7 commented Dec 8, 2022

Hi @licoco,
Thanks for your comment. That is actually the same as the description in the paper. It is just because the code of czsl utilizes a semantic graph to infer the zero-shot classes. y is the label, that is the same as the pairs in czsl. I do not implement an individual function for batchformer in czsl. But the current implementation is the same as the description, please refer to the two links that I provide in last comment. It is not necessary to change the code base of czsl to implement batchformer.

Regards,

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