Skip to content

Commit 968922b

Browse files
authored
Merge pull request #12154 from panyx0718/api
hide monkey_patch_variable
2 parents e90678c + e91e294 commit 968922b

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

python/paddle/fluid/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import recordio_writer
5757
import parallel_executor
5858
from parallel_executor import *
59+
from paddle.fluid.layers.math_op_patch import monkey_patch_variable
5960

6061
Tensor = LoDTensor
6162

@@ -138,5 +139,5 @@ def __bootstrap__():
138139

139140
# TODO(panyx0718): Avoid doing complex initialization logic in __init__.py.
140141
# Consider paddle.init(args) or paddle.main(args)
141-
layers.monkey_patch_variable()
142+
monkey_patch_variable()
142143
__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)