View source on GitHub |
Return a tensor of ones with the same shape and type of x
.
tf.keras.ops.ones_like(
x, dtype=None
)
Args | |
---|---|
x
|
Input tensor. |
dtype
|
Overrides the data type of the result. |
Returns | |
---|---|
A tensor of ones with the same shape and type as x .
|