Class IndexedSlicesSpec
tf.IndexedSlicesType specification for a .
TypeSpecInherits From:
Aliases:
- Class
tf.compat.v1.IndexedSlicesSpec - Class
tf.compat.v2.IndexedSlicesSpec
init
__init__(
shape=None,
dtype=tf.dtypes.float32,
indices_dtype=tf.dtypes.int64,
dense_shape_dtype=None,
indices_shape=None
)
tf.IndexedSlicesConstructs a type specification for a .
Args:
shape: The denseshapeof theIndexedSlices, orNoneto allow any denseshape.dtype:tf.DTypeof values in theIndexedSlices.indices_dtype:tf.DTypeof theindicesin theIndexedSlices. One oftf.int32ortf.int64.dense_shape_dtype:tf.DTypeof thedense_shapein theIndexedSlices. One oftf.int32,tf.int64, orNone(if theIndexedSliceshas nodense_shapetensor).indices_shape: Theshapeof theindicescomponent, which indicates how many slices are in theIndexedSlices.
Properties
value_type
Methods
eq
__eq__(other)
Return self==value.
ne
__ne__(other)
Return self!=value.
is_compatible_with
is_compatible_with(spec_or_value)
Returns true if spec_or_value is compatible with this TypeSpec.
most_specific_compatible_type
most_specific_compatible_type(other)
Returns the most specific TypeSpec compatible with self and other.
Args:
other: ATypeSpec.
Raises:
ValueError: If there is no TypeSpec that is compatible with bothselfandother.