<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/ops/parsing_config.py#L341-L358) |

Configuration for parsing a fixed-length input feature.

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.FixedLenFeature`](https://www.tensorflow.org/api_docs/python/tf/io/FixedLenFeature), [`tf.compat.v1.io.FixedLenFeature`](https://www.tensorflow.org/api_docs/python/tf/io/FixedLenFeature)

<br />

    tf.io.FixedLenFeature(
        shape, dtype, default_value=None
    )

### Used in the notebooks

| Used in the guide | Used in the tutorials |
|---|---|
| - [tf.data: Build TensorFlow input pipelines](https://www.tensorflow.org/guide/data) | - [TFRecord and tf.train.Example](https://www.tensorflow.org/tutorials/load_data/tfrecord) - [](https://www.tensorflow.org/tfx/transform/get_started) - [Recommending movies: retrieval using a sequential model](https://www.tensorflow.org/recommenders/examples/sequential_retrieval) - [Graph regularization for document classification using natural graphs](https://www.tensorflow.org/neural_structured_learning/tutorials/graph_keras_mlp_cora) - [Passage Ranking using TFR-BERT](https://www.tensorflow.org/ranking/tutorials/tfr_bert) |

To treat sparse input as dense, provide a `default_value`; otherwise,
the parse functions will fail on any examples missing this feature.

<br />

<br />

<br />

| ## Fields ||
|---|---|
| `shape` | Shape of input data. |
| `dtype` | Data type of input. |
| `default_value` | Value to be used if an example is missing this feature. It must be compatible with `dtype` and of the specified `shape`. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `shape` | A `namedtuple` alias for field number 0 |
| `dtype` | A `namedtuple` alias for field number 1 |
| `default_value` | A `namedtuple` alias for field number 2 |

<br />