tf.keras.ops.ones

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

shapeShape of the new tensor.
dtypeDesired data type of the tensor.

Tensor of ones with the given shape and dtype.