Skip to content

Commit 7de8d11

Browse files
committed
follow comments
1 parent 7876b21 commit 7de8d11

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/paddle/fluid/io.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -762,10 +762,10 @@ def _copy_reader_var_(block, var, new_name=None):
762762
new_var.persistable = True
763763
return new_var
764764

765-
def get_test_reader_name(train_reader_name):
765+
def _get_test_reader_name(train_reader_name):
766766
return train_reader_name + "_test"
767767

768-
def is_reader_op(op):
768+
def _is_reader_op(op):
769769
block = op.block
770770
if "Out" in op.output_names:
771771
reader_out = block.vars[op.output("Out")[0]]
@@ -783,7 +783,7 @@ def is_reader_op(op):
783783
startup_reader_op_list = []
784784

785785
for op in startup_block.ops:
786-
if is_reader_op(op):
786+
if _is_reader_op(op):
787787
startup_reader_op_list.append(op)
788788

789789
if len(startup_reader_op_list) == 0:
@@ -799,7 +799,7 @@ def is_reader_op(op):
799799
test_reader = _copy_reader_var_(
800800
startup_block,
801801
train_reader,
802-
new_name=get_test_reader_name(train_reader_name))
802+
new_name=_get_test_reader_name(train_reader_name))
803803
train_test_reader_map[train_reader.name] = test_reader
804804

805805
test_op_inputs = {}
@@ -830,7 +830,7 @@ def is_reader_op(op):
830830
for var in main_block.vars.values():
831831
if var.type == core.VarDesc.VarType.READER:
832832
main_block.rename_var(
833-
str(var.name), str(get_test_reader_name(var.name)))
833+
str(var.name), str(_get_test_reader_name(var.name)))
834834

835835
for op in main_block.ops:
836836
if op.type == root_reader_op.type:

0 commit comments

Comments
 (0)