From 9ec41c84eee135be4ccf9de616cc08477a560ab6 Mon Sep 17 00:00:00 2001 From: niuliling123 <51102941+niuliling123@users.noreply.github.com> Date: Wed, 15 Feb 2023 15:50:36 +0800 Subject: [PATCH] Fix a bug when O2 save checkpoint (#745) --- ppgan/utils/filesystem.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ppgan/utils/filesystem.py b/ppgan/utils/filesystem.py index 9b0ce88..a43c18f 100644 --- a/ppgan/utils/filesystem.py +++ b/ppgan/utils/filesystem.py @@ -53,8 +53,7 @@ def save(state_dicts, file_name): else: final_dict[k] = v - with open(file_name, 'wb') as f: - pickle.dump(final_dict, f, protocol=2) + paddle.save(final_dict, file_name) def load(file_name): -- GitLab