tf.keras.ops.squeeze

Remove axes of length one from x.

x Input tensor.
axis Select a subset of the entries of length one in the shape.

The input tensor with all or a subset of the dimensions of length 1 removed.