提交 bdae229a 编写于 作者: Z zhaojiaying01

fix loadWhenPredict option in PaddleMobileCPUConfig

上级 b4bf1a6f
......@@ -44,6 +44,11 @@
*/
@property (assign, nonatomic) BOOL optimize;
/**
@b 是否预测时初始化内存,用于处理可变输入
*/
@property (assign, nonatomic) BOOL loadWhenPredict;
@end
@interface PaddleMobileCPU : NSObject
......
......@@ -73,6 +73,8 @@ static std::mutex shared_mutex;
- (instancetype)initWithConfig:(PaddleMobileCPUConfig *)config {
if (self = [super init]) {
paddle_mobile::PaddleMobileConfigInternal configInternal;
configInternal.load_when_predict = config.loadWhenPredict;
pam_ = new paddle_mobile::PaddleMobile<paddle_mobile::CPU, float>();
_config = config;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册