-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ernie_pointwise_matching.py文本匹配demo #868
Comments
你好!请问paddle版本是多少? |
您好我这里也是同样的问题 ,训练和测试都是用的paddlehub1.8.2。 |
@dickobe @xiaotaiyangsun Padde版本是多少呢?可以按照如下代码查看paddle版本 import paddle
paddle.__version__ |
1.8.0 |
@xiaotaiyangsun @dickobe 使用GPU预测,建议将 |
多谢,可gpu预测 |
问下accelerate_mode是起什么作用的呢,为什么改为False后可以使用gpu? |
@dickobe accelerate_mode是使用Paddle 高阶预测API Analysis Predictor进行预测。 |
@Steffy-zxf 问下预测结果能输出匹配的概率得分吗?而不仅仅是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,帮忙看下 |
为什么demo在预测的时候使用gpu时脚本会报错,将use_gpu改成false才可以
The text was updated successfully, but these errors were encountered: