tf.keras.ops.reshape

Gives a new shape to a tensor without changing its data.

x Input tensor.
newshape The new shape should be compatible with the original shape. One shape dimension can be -1 in which case the value is inferred from the length of the array and remaining dimensions.

The reshaped tensor.