tf.keras.ops.is_tensor

Check whether the given object is a tensor.

x A variable.

True if x is a tensor, otherwise False.