@@ -2376,6 +2376,38 @@ def func(x):
2376
2376
return tf .identity (res , name = _TFOUTPUT ), tf .identity (res1 , name = _TFOUTPUT1 )
2377
2377
self ._run_test_case (func , [_OUTPUT , _OUTPUT1 ], {_INPUT : input_val })
2378
2378
2379
+ @check_opset_min_version (11 , "ReduceMin" )
2380
+ def test_reduce_all_negative_axis (self ):
2381
+ input_val = np .random .randint (0 , 2 , (10 , 20 )).astype (np .bool )
2382
+ def func (x ):
2383
+ res = tf .reduce_all (input_tensor = x , keepdims = False )
2384
+ res1 = tf .reduce_all (input_tensor = x , axis = [- 1 ], keepdims = False )
2385
+ return tf .identity (res , name = _TFOUTPUT ), tf .identity (res1 , name = _TFOUTPUT1 )
2386
+ self ._run_test_case (func , [_OUTPUT , _OUTPUT1 ], {_INPUT : input_val })
2387
+
2388
+ input_val = np .random .randint (0 , 2 , (10 , 20 )).astype (np .bool )
2389
+ def func (input_x ):
2390
+ res = tf .reduce_all (input_tensor = input_x , keepdims = True )
2391
+ res1 = tf .reduce_all (input_tensor = input_x , axis = [- 1 ], keepdims = True )
2392
+ return tf .identity (res , name = _TFOUTPUT ), tf .identity (res1 , name = _TFOUTPUT1 )
2393
+ self ._run_test_case (func , [_OUTPUT , _OUTPUT1 ], {_INPUT : input_val })
2394
+
2395
+ @check_opset_min_version (11 , "ReduceSums" )
2396
+ def test_reduce_any_negative_axis (self ):
2397
+ input_val = np .random .randint (0 , 2 , (10 , 20 )).astype (np .bool )
2398
+ def func (x ):
2399
+ res = tf .reduce_any (input_tensor = x , keepdims = False )
2400
+ res1 = tf .reduce_any (input_tensor = x , axis = [- 1 ], keepdims = False )
2401
+ return tf .identity (res , name = _TFOUTPUT ), tf .identity (res1 , name = _TFOUTPUT1 )
2402
+ self ._run_test_case (func , [_OUTPUT , _OUTPUT1 ], {_INPUT : input_val })
2403
+
2404
+ input_val = np .random .randint (0 , 2 , (10 , 20 )).astype (np .bool )
2405
+ def func (x ):
2406
+ res = tf .reduce_any (input_tensor = x , keepdims = True )
2407
+ res1 = tf .reduce_any (input_tensor = x , axis = [- 1 ], keepdims = True )
2408
+ return tf .identity (res , name = _TFOUTPUT ), tf .identity (res1 , name = _TFOUTPUT1 )
2409
+ self ._run_test_case (func , [_OUTPUT , _OUTPUT1 ], {_INPUT : input_val })
2410
+
2379
2411
@check_opset_min_version (7 , "fill" )
2380
2412
def test_zeros_like (self ):
2381
2413
input_val = np .random .random_sample ([10 , 20 ]).astype (np .float32 )
0 commit comments