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

metanet代码怎么跑 #72

Open
icoderzqliu opened this issue Dec 18, 2021 · 1 comment
Open

metanet代码怎么跑 #72

icoderzqliu opened this issue Dec 18, 2021 · 1 comment

Comments

@icoderzqliu
Copy link

icoderzqliu commented Dec 18, 2021

在metanet的代码中这里传入了None

fewshot_re_kit.framework.FewShotREModel.__init__(self, None)

但是在FewShotREModel中Dataparallel需要传入参数,否则报错

class FewShotREModel(nn.Module):
    def __init__(self, my_sentence_encoder):
        '''
        sentence_encoder: Sentence encoder
        
        You need to set self.cost as your own loss function.
        '''
        nn.Module.__init__(self)
        self.sentence_encoder = nn.DataParallel(my_sentence_encoder)
        self.cost = nn.CrossEntropyLoss()

我把metanet里的代码改为了

fewshot_re_kit.framework.FewShotREModel.__init__(self, embedding)

但是后面又出现了报错
请问要怎样操作或者配置参数才能成功跑通metanet的代码并复现论文中的结果呢?望解答,谢谢!

@icoderzqliu
Copy link
Author

@Henry-soul ** Henry**

你好,我只跑通了proto,并未提交测试

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