tf.keras.ops.ones_like

Return a tensor of ones with the same shape and type of x.

x Input tensor.
dtype Overrides the data type of the result.

A tensor of ones with the same shape and type as x.