tf.is_tensor

Check whether x is of tensor type.

tf.is_tensor(x)

Check whether an object is a tensor or a composite tensor. This check is equivalent to calling isinstance(x, (tf.Tensor, tf.SparseTensor, tf.RaggedTensor, tf.Variable)) and also checks if all the component variables of a MirroredVariable or a SyncOnReadVariable are tensors.

Args:

  • x: A python object to check.

Returns:

True if x is a tensor, False if not.

results matching ""

    No results matching ""