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:
zhoujun
2021-11-12 11:06:36 +08:00
committed by GitHub
parent 1417a3c2cf
commit ae4167dc32
16 changed files with 47 additions and 89 deletions
+2 -2
View File
@@ -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():