# tensorflow::ops::Empty Class Reference

# tensorflow::
ops::
Empty

`
#include <array_ops.h>
`


Creates a tensor with the given shape.

## Summary


This operation creates a tensor of
`
shape
`
and
`
dtype
`
.


Args:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- shape: 1-D. Represents the shape of the output tensor.

<br />


Optional attributes (see
`
https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs
`
):

- init: If True, initialize the returned tensor with the default value of dtype. Otherwise, the implementation is free not to initializethe tensor's content.

<br />


Returns:

- `
  https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` : A `
  https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor
  ` of type `
  T
  ` .

<br />

| ### Constructors and Destructors ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty_1afbeeb90876baaa5131ccd9ae1a733689 (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, DataType dtype) ` ||
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty_1a17ea31d51cede367a541675480d77a3f (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, DataType dtype, const https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs & attrs) ` ||

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty_1ae377e8630513546e65d719d56ecfe136 ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty_1a9c7d05401a0aa67f82fe592682f0bc15 ` | ` :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty_1a4fdbda6ce5b2f476acc70ada9df3eaa2 () const ` | ` ::tensorflow::Node * ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty_1ac54e9b4ae90bf596166c770dc6d22ce5 () const ` | ` ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty_1a9ae3f6fbe95cde1fcec65896b5397511 () const ` | ` ` |

| ### Public static functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty_1ac0b3b4819671ba0dd14c7ca6c1bacae4 (bool x) ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs ` |

| ### Structs ||
|---|---|
| [tensorflow:: ops:: Empty:: Attrs](https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/empty/attrs) | Optional attribute setters for [Empty](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty) . |

## Public attributes

### operation

```
Operation operation
```

### output

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

## Public functions

### Empty

```
 Empty(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  DataType dtype
)
```

### Empty

```
 Empty(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  DataType dtype,
  const Empty::Attrs & attrs
)
```

### node

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

### operator::tensorflow::Input

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

### operator::tensorflow::Output

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

## Public static functions

### Init

```
Attrs Init(
  bool x
)
```