[Paddle Capi] paddle_ivector_create如何设置batch size
请问一下,现在使用capi预测,输入为离散的category id,如果想做batch预测,paddle_ivector_create应该如何设置? http://paddlepaddle.org/documentation/docs/zh/0.12.0/howto/capi/organization_of_the_inputs_cn.html 文档中并没有找到。 这是单ins做inference的时候,我按照文档写的代码,如果想batch inference,应该怎么设置呢?
int age[] = {0};
paddle_ivector age_array =
paddle_ivector_create(age, sizeof(age) / sizeof(int), false, false);
CHECK(paddle_arguments_set_ids(in_args, 0, age_array));
batch + vector -> 矩阵
所以看下稀疏矩阵那块。
另外,v2已经停止开发一年多了,熟悉的同学不多,建议切换到目前主推的 fluid版本。
0.12.0版本 batch inference 可以参考 组织序列信息 一节 http://paddlepaddle.org/documentation/docs/zh/0.12.0/howto/capi/organization_of_the_inputs_cn.html#permalink-4--
另外推荐使用 Fluid 版本
Since you haven't replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。