@@ -762,10 +762,10 @@ def _copy_reader_var_(block, var, new_name=None):
762
762
new_var .persistable = True
763
763
return new_var
764
764
765
- def get_test_reader_name (train_reader_name ):
765
+ def _get_test_reader_name (train_reader_name ):
766
766
return train_reader_name + "_test"
767
767
768
- def is_reader_op (op ):
768
+ def _is_reader_op (op ):
769
769
block = op .block
770
770
if "Out" in op .output_names :
771
771
reader_out = block .vars [op .output ("Out" )[0 ]]
@@ -783,7 +783,7 @@ def is_reader_op(op):
783
783
startup_reader_op_list = []
784
784
785
785
for op in startup_block .ops :
786
- if is_reader_op (op ):
786
+ if _is_reader_op (op ):
787
787
startup_reader_op_list .append (op )
788
788
789
789
if len (startup_reader_op_list ) == 0 :
@@ -799,7 +799,7 @@ def is_reader_op(op):
799
799
test_reader = _copy_reader_var_ (
800
800
startup_block ,
801
801
train_reader ,
802
- new_name = get_test_reader_name (train_reader_name ))
802
+ new_name = _get_test_reader_name (train_reader_name ))
803
803
train_test_reader_map [train_reader .name ] = test_reader
804
804
805
805
test_op_inputs = {}
@@ -830,7 +830,7 @@ def is_reader_op(op):
830
830
for var in main_block .vars .values ():
831
831
if var .type == core .VarDesc .VarType .READER :
832
832
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 )))
834
834
835
835
for op in main_block .ops :
836
836
if op .type == root_reader_op .type :
0 commit comments