Skip to content

Commit 077aa20

Browse files
committed
hide monkey_patch_variable
1 parent f02a4da commit 077aa20

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

python/paddle/fluid/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
import parallel_executor
5858
from parallel_executor import *
5959

60+
from paddle.fluid.layers.math_op_patch import monkey_patch_variable
61+
6062
Tensor = LoDTensor
6163

6264
__all__ = framework.__all__ + executor.__all__ + concurrency.__all__ + \
@@ -138,5 +140,5 @@ def __bootstrap__():
138140

139141
# TODO(panyx0718): Avoid doing complex initialization logic in __init__.py.
140142
# Consider paddle.init(args) or paddle.main(args)
141-
layers.monkey_patch_variable()
143+
monkey_patch_variable()
142144
__bootstrap__()

python/paddle/fluid/layers/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
from learning_rate_scheduler import *
3434

3535
__all__ = []
36-
__all__ += math_op_patch.__all__
3736
__all__ += nn.__all__
3837
__all__ += io.__all__
3938
__all__ += tensor.__all__

python/paddle/fluid/layers/math_op_patch.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
from layer_function_generator import OpProtoHolder
1717
from ..initializer import force_init_on_cpu
1818

19-
__all__ = ['monkey_patch_variable']
20-
2119

2220
def monkey_patch_variable():
2321
def unique_tmp_name():

0 commit comments

Comments
 (0)