未验证 提交 17df5ddf 编写于 作者: W Weilong Wu 提交者: GitHub

[Eager] Fix test_imperative_optimizer_v2 eager mode global issue (#41633) (#41727)

上级 8dba3d0b
......@@ -1360,6 +1360,8 @@ class ReduceOnPlateau(LRScheduler):
if not _in_legacy_dygraph():
tmp = core.eager.Tensor
else:
# need to declarate explicitly
from paddle.framework import VarBase as Tensor
tmp = Tensor
# loss must be float, numpy.ndarray or 1-D Tensor with shape [1]
if isinstance(metrics, (tmp, numpy.ndarray)):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册