We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce26f88 commit 64df2a5Copy full SHA for 64df2a5
python/paddle/fluid/tests/unittests/op_test.py
@@ -1419,7 +1419,8 @@ def check_grad_with_place(self,
1419
# FIXME: Replace numeric_place with place to calculate numeric_grads.
1420
# NOTE(liym27): There is an unknown error when call op.run() on NPUPlace, which
1421
# needs to be fixed.
1422
- if self.__class__.use_npu == True:
+ if hasattr(self.__class__,
1423
+ "use_npu") and self.__class__.use_npu == True:
1424
numeric_place = paddle.CPUPlace()
1425
else:
1426
numeric_place = place
0 commit comments