# tf.placeholder_with_default

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/array_ops.py#L2622-L2635) |

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

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.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/r1.15/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 />