tensorflow axis definition starts from 0 or 1?
So you have a tensor a, with shape [x, y, z, w]. When using a function which expects the axis parameter, the axis numbering for a will be [0, 1, 2, 3]. Reducing axes 1 and 3 results in those axes "disappearing" (because you are reducing those axes), so the output will consist of original axes [0, 2] which means the resulting shape is [x, z].
I am quite confused by Tensorflow's reduce axis function. For example, reduce_max(). Suppose I have a four dimension variable a with a shape of a = [x, y, z, w] where x, y, z, and w are the length that dimension. I have a command like b = tf.reduce_max(a, axis=(1, 3)), in this case, what will be the shape of b? b = [x, z] or b=[y, w]? Basically, I am just wondering which axis is the reduce_max() operating on. If the axis is defined from 0, then b = [x, z]. Otherwise, b = [y, w].