# tf.compat.v1.placeholder_with_default

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/ops/array_ops.py#L2721-L2734) |

A placeholder op that passes through `input` when its output is not fed.

    tf.compat.v1.placeholder_with_default(
        input, shape, name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `input` | A `Tensor`. The default value to produce when output is not fed. |
| `shape` | A [`tf.TensorShape`](https://www.tensorflow.org/versions/r2.1/api_docs/python/tf/TensorShape) or list of `int`s. The (possibly partial) shape of the tensor. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor`. Has the same type as `input`. ||

<br />