# tf.IndexedSlicesSpec

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/IndexedSlicesSpec) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/framework/indexed_slices.py#L183-L246) |

Type specification for a [`tf.IndexedSlices`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/IndexedSlices).

Inherits From: [`TypeSpec`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/TypeSpec)

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.IndexedSlicesSpec`](https://www.tensorflow.org/api_docs/python/tf/IndexedSlicesSpec), \`tf.compat.v2.IndexedSlicesSpec\`

<br />

    tf.IndexedSlicesSpec(
        shape=None, dtype=tf.dtypes.float32, indices_dtype=tf.dtypes.int64,
        dense_shape_dtype=None, indices_shape=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `shape` | The dense shape of the `IndexedSlices`, or `None` to allow any dense shape. |
| `dtype` | [`tf.DType`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/dtypes/DType) of values in the `IndexedSlices`. |
| `indices_dtype` | [`tf.DType`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/dtypes/DType) of the `indices` in the `IndexedSlices`. One of [`tf.int32`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf#int32) or [`tf.int64`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf#int64). |
| `dense_shape_dtype` | [`tf.DType`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/dtypes/DType) of the `dense_shape` in the `IndexedSlices`. One of [`tf.int32`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf#int32), [`tf.int64`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf#int64), or `None` (if the `IndexedSlices` has no `dense_shape` tensor). |
| `indices_shape` | The shape of the `indices` component, which indicates how many slices are in the `IndexedSlices`. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `value_type` | <br /> <br /> |

<br />

## Methods

### `is_compatible_with`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/framework/type_spec.py#L87-L102)

    is_compatible_with(
        spec_or_value
    )

Returns true if `spec_or_value` is compatible with this TypeSpec.

### `most_specific_compatible_type`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/framework/type_spec.py#L104-L126)

    most_specific_compatible_type(
        other
    )

Returns the most specific TypeSpec compatible with `self` and `other`.

<br />

<br />

<br />

| Args ||
|---|---|
| `other` | A `TypeSpec`. |

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `ValueError` | If there is no TypeSpec that is compatible with both `self` and `other`. |

<br />

### `__eq__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/framework/type_spec.py#L262-L265)

    __eq__(
        other
    )

Return self==value.

### `__ne__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/framework/type_spec.py#L267-L268)

    __ne__(
        other
    )

Return self!=value.