未验证 提交 a148a889 编写于 作者: Y Yibing Liu 提交者: GitHub

Merge pull request #60 from PaddlePaddle/update_readme

Update readme
......@@ -376,13 +376,13 @@ src.data.Reset(...);
paddle::PaddleTensor pos_id;
paddle::PaddleTensor segmeng_id;
paddle::PaddleTensor self_attention_bias;
paddle::PaddleTensor next_segment_index;
paddle::PaddleTensor input_mask;
// create iutput tensors and run prediction
std::vector<paddle::PaddleTensor> output;
predictor->Run({src_id, pos_id, segmeng_id, self_attention_bias, next_segment_index}, &output);
predictor->Run({src_id, pos_id, segmeng_id, input_mask}, &output);
// XNLI task for example
std::cout << "example_id\tcontradiction\tentailment\tneutral";
for (size_t i = 0; i < output.front().data.length() / sizeof(float); i += 3) {
std::cout << static_cast<float *>(output.front().data.data())[i] << "\t"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册