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 48e1b11 commit 0053ba8Copy full SHA for 0053ba8
python/paddle/tensor/logic.py
@@ -16,9 +16,13 @@
16
from ..fluid.data_feeder import check_type, check_variable_and_dtype
17
from ..fluid.layers.layer_function_generator import templatedoc
18
from ..static import Variable
19
-from ..framework import VarBase as Tensor
20
from ..fluid.framework import _in_legacy_dygraph, in_dygraph_mode
21
-# TODO: define logic functions of a tensor
+# TODO: define logic functions of a tensor
+import paddle.fluid as fluid
22
+if fluid.framework._in_eager_mode_:
23
+ Tensor = fluid.framework.core.eager.Tensor
24
+else:
25
+ from ..framework import VarBase as Tensor
26
from ..fluid.layers import is_empty # noqa: F401
27
from ..fluid.layers import logical_and # noqa: F401
28
from ..fluid.layers import logical_not # noqa: F401
0 commit comments