# tensorflow::ops::Placeholder

`#include <array_ops.h>`

A placeholder op for a value that will be fed into the computation.

## Summary

N.B. This operation will fail with an error if it is executed. It is intended as a way to represent a value that will always be fed, and to provide attrs that enable the fed value to be checked at runtime.

Arguments:

- scope: A [Scope](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- dtype: The type of elements in the tensor.

<br />

Optional attributes (see `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/placeholder/attrs#structtensorflow_1_1ops_1_1_placeholder_1_1_attrs`):

- shape: (Optional) The shape of the tensor. If the shape has 0 dimensions, the shape is unconstrained.

<br />

Returns:

- `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output`: A placeholder tensor that must be replaced using the feed mechanism.

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder_1adb3e3d0b072d160a2df953b84093f55d(const ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, DataType dtype)` ||
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder_1abb57d03cb93c356b129016dc3ff00e87(const ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, DataType dtype, const https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/placeholder/attrs#structtensorflow_1_1ops_1_1_placeholder_1_1_attrs & attrs)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder_1af4a6ff42f4dd94bf5dd37de61cea5ef0` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder_1a84e658dbf37cb549c1777496b6dbe5b7` | `::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder_1a783185c82a138844a15cfc31b94d16ae() const ` | `::tensorflow::Node *` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder_1a698c9b9de24acafaccc356d925b22295() const ` | ` `` ` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder_1a22ddd47d22954ae354221696caf75d0b() const ` | ` `` ` |

| ### Public static functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder_1a7b0844809be785ca077012ead552c73d(PartialTensorShape x)` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/placeholder/attrs#structtensorflow_1_1ops_1_1_placeholder_1_1_attrs` |

| ### Structs ||
|---|---|
| [tensorflow::ops::Placeholder::Attrs](https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/placeholder/attrs) | Optional attribute setters for [Placeholder](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/placeholder#classtensorflow_1_1ops_1_1_placeholder). |

## Public attributes

### operation

```
Operation operation
```

### output

```
::tensorflow::Output output
```

## Public functions

### Placeholder

```
 Placeholder(
  const ::tensorflow::Scope & scope,
  DataType dtype
)
```

### Placeholder

```
 Placeholder(
  const ::tensorflow::Scope & scope,
  DataType dtype,
  const Placeholder::Attrs & attrs
)
```

### node

```
::tensorflow::Node * node() const 
```

### operator::tensorflow::Input

```
 operator::tensorflow::Input() const 
```

### operator::tensorflow::Output

```
 operator::tensorflow::Output() const 
```

## Public static functions

### Shape

```
Attrs Shape(
  PartialTensorShape x
)
```