diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 3d8cd1142cf3a5fb1b91c91cc654806ca39acea6..a26e322cbd9b70aeba6c4f7a455495a75f17c9af 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -90,6 +90,8 @@ def _test_eager_guard(tracer=None): if not _already_patch_eager_tensor: from .dygraph.varbase_patch_methods import monkey_patch_varbase monkey_patch_varbase() + from .dygraph import monkey_patch_math_varbase + monkey_patch_math_varbase() _already_patch_eager_tensor = True if tracer is None: core._set_eager_tracer(_dygraph_tracer_)