# tf.io.FixedLenFeature

<br />

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

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
    )

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 />