File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
python/paddle/fluid/tests/unittests Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -235,12 +235,13 @@ def test_extremely_simple_net_with_op_in_condition(self):
235
235
place = fluid .CUDAPlace (0 ) if core .is_compiled_with_cuda (
236
236
) else fluid .CPUPlace ()
237
237
exe = fluid .Executor (place )
238
- ret = exe .run (main_program , fetch_list = [out , a .grad_name , b .grad_name ])
238
+ ret = exe .run (main_program ,
239
+ fetch_list = [out , b , a .grad_name , b .grad_name ])
239
240
# Note: fill_constant has loss of precision, you have to assertEqual
240
241
# with values doens't lose precision in float-point number.
241
- self .assertEqual (ret [0 ][0 ], 1.25 )
242
- self .assertEqual (ret [1 ][0 ], 0.0 )
243
- self .assertEqual (ret [2 ][0 ], 1.0 )
242
+ self .assertEqual (ret [0 ][0 ], ret [ 1 ][ 0 ] )
243
+ self .assertEqual (ret [2 ][0 ], 0.0 )
244
+ self .assertEqual (ret [3 ][0 ], 1.0 )
244
245
245
246
246
247
class TestCondNestedControlFlow (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments