File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
python/paddle/fluid/tests/unittests Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -69,17 +69,18 @@ def check_with_place(self, place):
69
69
70
70
op = Operator ("split_ids" , Ids = "X" , Out = outs_name )
71
71
72
- op .run (scope , place )
73
-
74
- for i in range (len (outs )):
75
- expected_rows = expected_out_rows [i ]
76
- self .assertEqual (outs [i ].rows (), expected_rows )
77
- for j in range (len (expected_rows )):
78
- row = expected_rows [j ]
79
- self .assertAlmostEqual (
80
- float (row ), np .array (outs [i ].get_tensor ())[j , 0 ])
81
- self .assertAlmostEqual (
82
- float (row + 1 ), np .array (outs [i ].get_tensor ())[j , 1 ])
72
+ for _ in range (3 ):
73
+ op .run (scope , place )
74
+
75
+ for i in range (len (outs )):
76
+ expected_rows = expected_out_rows [i ]
77
+ self .assertEqual (outs [i ].rows (), expected_rows )
78
+ for j in range (len (expected_rows )):
79
+ row = expected_rows [j ]
80
+ self .assertAlmostEqual (
81
+ float (row ), np .array (outs [i ].get_tensor ())[j , 0 ])
82
+ self .assertAlmostEqual (
83
+ float (row + 1 ), np .array (outs [i ].get_tensor ())[j , 1 ])
83
84
84
85
85
86
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments