Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

capi user documents

Open fastback407 opened this issue 9 years ago • 7 comments

Hi guys,

It'll be great help if you could support user documents about capi.

Thanks.

fastback407 avatar Jul 03 '17 03:07 fastback407

Can this README.md help you?

hedaoyuan avatar Jul 03 '17 03:07 hedaoyuan

Is there any documents about the apis such as paddle_matrix_create_sparse()? If I have 2 slot, and 1 is binary, how to combine them, and how to get the predict result?

fastback407 avatar Jul 03 '17 06:07 fastback407

Is there any documents about the apis such as paddle_matrix_create_sparse()?

Sorry, there is no document at present, but most api has annotations. paddle_matrix_create_sparse

Here is an example of how to use capi inference. Where the ./trainer_config.bin file is converted from the training file by convert_protobin.sh.

hedaoyuan avatar Jul 03 '17 09:07 hedaoyuan

Thanks, but what does '10' means in this loop: printf("Prob: "); for (int i = 0; i < 10; ++i) { printf("%.2f ", array[i]); } Where could I get it?

fastback407 avatar Jul 03 '17 10:07 fastback407

The number 10 comes from here, is the output size of the trainer_config.py. And the trainer_config.bin in the demo is converted from trainer_config.py.

hedaoyuan avatar Jul 03 '17 11:07 hedaoyuan

how to config trainer_config.py?

fastback407 avatar Jul 04 '17 03:07 fastback407

trainer_config.py is the configuration file used for training. You can refer to the example inside tutorials.

hedaoyuan avatar Jul 13 '17 05:07 hedaoyuan