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 denseshape
of theIndexedSlices
, orNone
to allow any denseshape
.dtype
:tf.DType
of values in theIndexedSlices
.indices_dtype
:tf.DType
of theindices
in theIndexedSlices
. One oftf.int32
ortf.int64
.dense_shape_dtype
:tf.DType
of thedense_shape
in theIndexedSlices
. One oftf.int32
,tf.int64
, orNone
(if theIndexedSlices
has nodense_shape
tensor).indices
_shape
: Theshape
of theindices
component, 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 bothself
andother
.