未验证 提交 03b09bd6 编写于 作者: W wanghuancoder 提交者: GitHub

fix can not find eager attr, test=develop (#38071)

上级 69252fd8
...@@ -20,4 +20,5 @@ def monkey_patch_eagertensor(): ...@@ -20,4 +20,5 @@ def monkey_patch_eagertensor():
from paddle.tensor.to_string import eager_tensor_to_string from paddle.tensor.to_string import eager_tensor_to_string
return eager_tensor_to_string(self) return eager_tensor_to_string(self)
if hasattr(core, "eager"):
setattr(core.eager.EagerTensor, "__str__", __str__) setattr(core.eager.EagerTensor, "__str__", __str__)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册