{ }
View source on GitHub |
Converts the given object to a Tensor
or an IndexedSlices
.
tf.compat.v1.convert_to_tensor_or_indexed_slices(
value, dtype=None, name=None
)
If value
is an IndexedSlices
or SparseTensor
it is returned
unmodified. Otherwise, it is converted to a Tensor
using
convert_to_tensor()
.
Returns | |
---|---|
A Tensor , IndexedSlices , or SparseTensor based on value .
|
Raises | |
---|---|
ValueError
|
If dtype does not match the element type of value .
|