diff --git a/python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py b/python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py index 447b52ace697878cf2a4d3425e5e2c99d79c073d..d04a3a53db3e2b6b0bc64e32dfde8a85732d6ec9 100755 --- a/python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py +++ b/python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py @@ -906,7 +906,7 @@ def save_persistables(exe, dirname, main_program, filename=None): "_velocity_0" ] for check in checks: - if var.name.endswith(check): + if var.name.endswith(check) and var.persistable: return True return False