提交 674d7ce0 编写于 作者: R Ray Liu 提交者: GitHub

Merge pull request #1414 from smilejames/develop

fix loadWhenPredict option in PaddleMobileCPUConfig
......@@ -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.
先完成此消息的编辑!
想要评论请 注册