We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问下预测结果能输出匹配的概率得分吗?而不仅仅是0和1 将predict接口参数return_result=False,按照如下代码进行后处理: run_states = pointwise_matching_task.predict( data=text_pairs, max_seq_len=args.max_seq_len, label_list=dataset.get_labels(), return_result=False, accelerate_mode=False) for batch_states in run_states: # 对应label概率值 batch_results = batch_states.run_results print(batch_results)
问下预测结果能输出匹配的概率得分吗?而不仅仅是0和1
将predict接口参数return_result=False,按照如下代码进行后处理:
run_states = pointwise_matching_task.predict( data=text_pairs, max_seq_len=args.max_seq_len, label_list=dataset.get_labels(), return_result=False, accelerate_mode=False) for batch_states in run_states: # 对应label概率值 batch_results = batch_states.run_results print(batch_results)
@Steffy-zxf 你好 我按照上面的方式,输出只有0和1,帮忙看下
Originally posted by @dickobe in #868 (comment)
The text was updated successfully, but these errors were encountered:
此问题目前需要在paddlehub/finetune/task/matching_task.py文件中,在第750行进行修改后修复:
paddlehub/finetune/task/matching_task.py
if return_result or not self._compatible_mode: return self._postprocessing(run_states)
修改为:
if return_result: return self._postprocessing(run_states)
1.8版本中的加入的兼容性代码影响了predidt结果处理的逻辑,之后2.0版本更新支持动态图版本的pointwise_matching_task,将修复这个问题。
Sorry, something went wrong.
遇到和你一样的问题了 貌似只有改源码了
Steffy-zxf
No branches or pull requests
@Steffy-zxf 你好 我按照上面的方式,输出只有0和1,帮忙看下
Originally posted by @dickobe in #868 (comment)
The text was updated successfully, but these errors were encountered: