mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
Rename pybind/fastdeploy_runtime.cc to pybind/runtime.cc (#273)
* fix yaml * Rename pybind/fastdeploy_runtime.cc to runtime.cc
This commit is contained in:
@@ -139,16 +139,16 @@ ModelFormat GuessModelFormat(const std::string& model_file) {
|
||||
|
||||
void RuntimeOption::SetModelPath(const std::string& model_path,
|
||||
const std::string& params_path,
|
||||
const std::string& _model_format) {
|
||||
if (_model_format == "paddle") {
|
||||
const ModelFormat& format) {
|
||||
if (format == ModelFormat::PADDLE) {
|
||||
model_file = model_path;
|
||||
params_file = params_path;
|
||||
model_format = ModelFormat::PADDLE;
|
||||
} else if (_model_format == "onnx") {
|
||||
} else if (format == ModelFormat::ONNX) {
|
||||
model_file = model_path;
|
||||
model_format = ModelFormat::ONNX;
|
||||
} else {
|
||||
FDASSERT(false, "The model format only can be 'paddle' or 'onnx'.");
|
||||
FDASSERT(false, "The model format only can be ModelFormat::PADDLE/ModelFormat::ONNX.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,7 @@ struct FASTDEPLOY_DECL RuntimeOption {
|
||||
// model_format support 'paddle' / 'onnx' now.
|
||||
void SetModelPath(const std::string& model_path,
|
||||
const std::string& params_path = "",
|
||||
const std::string& _model_format = "paddle");
|
||||
const ModelFormat& format = ModelFormat::PADDLE);
|
||||
|
||||
// set model inference in GPU
|
||||
void UseCpu();
|
||||
|
Reference in New Issue
Block a user