mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-10-25 10:17:04 +08:00
merge init_model and load_dygraph_params to load_model (#4623)
* merge init_model and load_dygraph_params to load_model
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@ from ppocr.data import build_dataloader
|
||||
from ppocr.modeling.architectures import build_model
|
||||
from ppocr.postprocess import build_post_process
|
||||
from ppocr.metrics import build_metric
|
||||
from ppocr.utils.save_load import init_model, load_dygraph_params
|
||||
from ppocr.utils.save_load import load_model
|
||||
from ppocr.utils.utility import print_dict
|
||||
import tools.program as program
|
||||
|
||||
@@ -60,7 +60,7 @@ def main():
|
||||
else:
|
||||
model_type = None
|
||||
|
||||
best_model_dict = load_dygraph_params(config, model, logger, None)
|
||||
best_model_dict = load_model(config, model)
|
||||
if len(best_model_dict):
|
||||
logger.info('metric in ckpt ***************')
|
||||
for k, v in best_model_dict.items():
|
||||
|
||||
Reference in New Issue
Block a user