tensorflow中的 reduction_indices参数

   注:文章转自 【tensorflow reduction_indices理解 - 校草的舍友 - 博客园】

 

在tensorflow的使用中,经常会使用tf.reduce_mean,tf.reduce_sum等函数,在函数中,有一个reduction_indices参数,表示函数的处理维度,直接上图,一目了然.

tensorflow中的 reduction_indices参数

 

  需要注意的一点,在很多的时候,我们看到别人的代码中并没有reduction_indices这个参数,此时该参数取默认值None,将把input_tensor降到0维,也就是一个数。