tf.keras.ops.ones

Return a new tensor of given shape and type, filled with ones.

shape Shape of the new tensor.
dtype Desired data type of the tensor.

Tensor of ones with the given shape and dtype.