mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
[Bug Fix] When loading model from memory, don't need CheckModelFormat (#1073)
When loading model from memory, don't need CheckModelFormat
This commit is contained in:
@@ -140,9 +140,11 @@ bool FastDeployModel::InitRuntimeWithSpecifiedDevice() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool FastDeployModel::InitRuntime() {
|
bool FastDeployModel::InitRuntime() {
|
||||||
|
if (!runtime_option.model_from_memory_) {
|
||||||
FDASSERT(
|
FDASSERT(
|
||||||
CheckModelFormat(runtime_option.model_file, runtime_option.model_format),
|
CheckModelFormat(runtime_option.model_file, runtime_option.model_format),
|
||||||
"ModelFormatCheck Failed.");
|
"ModelFormatCheck Failed.");
|
||||||
|
}
|
||||||
if (runtime_initialized_) {
|
if (runtime_initialized_) {
|
||||||
FDERROR << "The model is already initialized, cannot be initliazed again."
|
FDERROR << "The model is already initialized, cannot be initliazed again."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
Reference in New Issue
Block a user