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

etl_span train.py 代码问题? #59

Open
liutianling opened this issue Oct 23, 2020 · 2 comments
Open

etl_span train.py 代码问题? #59

liutianling opened this issue Oct 23, 2020 · 2 comments

Comments

@liutianling
Copy link

/run/relation_extraction/etl_span/train.py
line 145-147
ans_dict = self.convert_spo_contour(qids, subject_pred, po_pred, eval_file,
answer_dict, use_bert=self.args.use_bert)
return ans_dict
convert_spo_contour 在 285-315行
该函数代码中并没有 return ,这里是用了其他高级语法还是torch的什么特性,这里没有看懂。
谢谢大家了

@huangdian-scu
Copy link

仔细读代码,ans_dict并没用,是none,用的是传入函数内部被改变的answer_dict

@feiyunamy
Copy link

/run/relation_extraction/etl_span/train.py
line 145-147
ans_dict = self.convert_spo_contour(qids, subject_pred, po_pred, eval_file,
answer_dict, use_bert=self.args.use_bert)
return ans_dict
convert_spo_contour 在 285-315行
该函数代码中并没有 return ,这里是用了其他高级语法还是torch的什么特性,这里没有看懂。
谢谢大家了

预测输出被append到answer_dict中了

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