From d0bf506feecbcf394d00920b42e8674bb0539c37 Mon Sep 17 00:00:00 2001 From: huangyuxin Date: Tue, 30 Nov 2021 12:21:25 +0000 Subject: [PATCH] fix the load checkpoint --- paddlespeech/s2t/utils/checkpoint.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/paddlespeech/s2t/utils/checkpoint.py b/paddlespeech/s2t/utils/checkpoint.py index 4c493715..1d24c880 100644 --- a/paddlespeech/s2t/utils/checkpoint.py +++ b/paddlespeech/s2t/utils/checkpoint.py @@ -94,10 +94,7 @@ class Checkpoint(): """ configs = {} - if len(checkpoint_path) == 0 or checkpoint_path == "None": - checkpoint_path = None - - if checkpoint_path is not None: + if checkpoint_path: pass elif checkpoint_dir is not None and record_file is not None: # load checkpint from record file