mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +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() {
|
||||
FDASSERT(
|
||||
CheckModelFormat(runtime_option.model_file, runtime_option.model_format),
|
||||
"ModelFormatCheck Failed.");
|
||||
if (!runtime_option.model_from_memory_) {
|
||||
FDASSERT(
|
||||
CheckModelFormat(runtime_option.model_file, runtime_option.model_format),
|
||||
"ModelFormatCheck Failed.");
|
||||
}
|
||||
if (runtime_initialized_) {
|
||||
FDERROR << "The model is already initialized, cannot be initliazed again."
|
||||
<< std::endl;
|
||||
|
Reference in New Issue
Block a user