tf.keras.ops.median

Compute the median along the specified axis.

x Input tensor.
axis Axis or axes along which the medians are computed. Defaults to axis=None which is to compute the median(s) along a flattened version of the array.
keepdims If this is set to True, the axes which are reduce are left in the result as dimensions with size one.

The output tensor.