From ecfdfc9c58d7bcd6e70d0964a469250724359c0b Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Sat, 26 Sep 2020 18:04:35 +0800 Subject: [PATCH] fix guard place set error (#27573) --- python/paddle/fluid/dygraph/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/dygraph/base.py b/python/paddle/fluid/dygraph/base.py index 01c2f0fed49..69fb23383e5 100644 --- a/python/paddle/fluid/dygraph/base.py +++ b/python/paddle/fluid/dygraph/base.py @@ -363,7 +363,7 @@ def guard(place=None): with framework.program_guard(train, startup): with framework.unique_name.guard(): with framework._dygraph_guard(tracer): - with framework._dygraph_place_guard(place): + with framework._dygraph_place_guard(expected_place): yield -- GitLab