@@ -572,6 +572,22 @@ def keras_relu6(x):
572
572
save (inp , reduced , 'reduce_mean' )
573
573
################################################################################
574
574
inp = tf .placeholder (tf .float32 , [2 , 3 , 4 , 5 ], 'input' )
575
+ reduced = tf .reduce_max (inp , axis = [1 , 2 ], keepdims = True )
576
+ save (inp , reduced , 'reduce_max' )
577
+ ################################################################################
578
+ inp = tf .placeholder (tf .float32 , [1 , 2 , 2 , 4 ], 'ReduceMax' )
579
+ out = tf .reduce_max ([inp , inp * 2 ], axis = 0 )
580
+ save (inp , out , 'max_pool_by_axis' )
581
+ ################################################################################
582
+ inp = tf .placeholder (tf .float32 , [1 , 4 , 2 , 3 ], 'input' )
583
+ out = tf .math .reduce_max (inp , axis = - 1 )
584
+ save (inp , out , 'reduce_max_channel' )
585
+ ################################################################################
586
+ inp = tf .placeholder (tf .float32 , [1 , 4 , 2 , 3 ], 'input' )
587
+ out = tf .math .reduce_max (inp , axis = - 1 , keep_dims = True )
588
+ save (inp , out , ('reduce_max_channel' , 'keep_dims' ), is_gen_data = False )
589
+ ################################################################################
590
+ inp = tf .placeholder (tf .float32 , [2 , 3 , 4 , 5 ], 'input' )
575
591
reduced = tf .reduce_sum (inp , axis = [1 , 2 ], keepdims = True )
576
592
save (inp , reduced , 'reduce_sum' )
577
593
################################################################################
0 commit comments