Skip to content

Commit 1ae086e

Browse files
Merge pull request #10340 from wanghaoshuang/fix_future_div
Make Variable support for future.division.
2 parents 88d79df + 3d846fc commit 1ae086e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/paddle/fluid/layers/math_op_patch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ def __impl__(self, other_var):
169169
# a*b == b*a. Do not need to reverse explicitly
170170
("__rmul__", "elementwise_mul", False),
171171
("__div__", "elementwise_div", False),
172+
("__truediv__", "elementwise_div", False),
172173
("__rdiv__", "elementwise_div", True),
174+
("__rtruediv__", "elementwise_div", True),
173175
("__pow__", "elementwise_pow", False),
174176
("__rpow__", "elementwise_pow", True),
175177
# for logical compare

0 commit comments

Comments
 (0)