mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +08:00
Rename fastdeploy_runtime.h to runtime.h and Frontend to ModelFormat (#263)
rename frontend to model_format
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
import logging
|
||||
from .... import FastDeployModel, Frontend
|
||||
from .... import FastDeployModel, ModelFormat
|
||||
from .... import c_lib_wrap as C
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class MODNet(FastDeployModel):
|
||||
model_file,
|
||||
params_file="",
|
||||
runtime_option=None,
|
||||
model_format=Frontend.ONNX):
|
||||
model_format=ModelFormat.ONNX):
|
||||
# 调用基函数进行backend_option的初始化
|
||||
# 初始化后的option保存在self._runtime_option
|
||||
super(MODNet, self).__init__(runtime_option)
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
import logging
|
||||
from .... import FastDeployModel, Frontend
|
||||
from .... import FastDeployModel, ModelFormat
|
||||
from .... import c_lib_wrap as C
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@ class PPMatting(FastDeployModel):
|
||||
params_file,
|
||||
config_file,
|
||||
runtime_option=None,
|
||||
model_format=Frontend.PADDLE):
|
||||
model_format=ModelFormat.PADDLE):
|
||||
super(PPMatting, self).__init__(runtime_option)
|
||||
|
||||
assert model_format == Frontend.PADDLE, "PPMatting model only support model format of Frontend.Paddle now."
|
||||
assert model_format == ModelFormat.PADDLE, "PPMatting model only support model format of ModelFormat.Paddle now."
|
||||
self._model = C.vision.matting.PPMatting(
|
||||
model_file, params_file, config_file, self._runtime_option,
|
||||
model_format)
|
||||
|
Reference in New Issue
Block a user