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
麻烦问一下,训练模型的时候,使用了不同的type,使用paddle的capi加载模型预测时,in_args怎么用, nid是[0,0,1.....]one-hot格式的,长度少于500 nid = paddle.layer.data(name='nid', type=paddle.data_type.sparse_binary_vector(500)) sub_time = paddle.layer.data(name='sub_time', type=paddle.data_type.dense_vector(1))
The text was updated successfully, but these errors were encountered:
对于sparse_binary_vector请参考例子:https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/capi/examples/model_inference/sparse_binary
对于dense_vector请参考例子:https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/capi/examples/model_inference/dense
另外in_args没有描述清楚,不了解的同学,根本不知道在说啥~
in_args
Sorry, something went wrong.
paddle_arguments在设置时,有个Index,用来表示slot id,代码: https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/capi/arguments.h#L75
paddle_arguments
多个slot(或feature)时,使用同一个paddle_arguments,设置不同的index。
paddle_arguments_set_value(in_args, 0, sparse_mat) paddle_arguments_set_value(in_args, 1, dense_mat)
Duplicated with #3182
No branches or pull requests
麻烦问一下,训练模型的时候,使用了不同的type,使用paddle的capi加载模型预测时,in_args怎么用,
nid是[0,0,1.....]one-hot格式的,长度少于500
nid = paddle.layer.data(name='nid', type=paddle.data_type.sparse_binary_vector(500))
sub_time = paddle.layer.data(name='sub_time', type=paddle.data_type.dense_vector(1))
The text was updated successfully, but these errors were encountered: