Skip to content

CAPI如何加载合并模型 #8883

Closed
Closed
@yeyupiaoling

Description

@yeyupiaoling

这里是介绍普通的加载模型的方法

long size;
void* buf = read_config(CONFIG_BIN, &size);
// Create the gradient machine for inference.
paddle_gradient_machine machine;
CHECK(paddle_gradient_machine_create_for_inference(&machine, buf, (int)size));
// Load the trained model. Modify the parameter MODEL_PATH to set the correct
// path of the trained model.
CHECK(paddle_gradient_machine_load_parameter_from_disk(machine, MODEL_PATH));

文档这也用说到下面一行代码是加载合并模型的,我看怎么跟上面的一样呢
https://github.com/PaddlePaddle/Mobile/blob/develop/Demo/linux/paddle_image_recognizer.cpp#L59

Metadata

Metadata

Labels

User用于标记用户问题

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions