# Output

public final class **Output** A symbolic handle to a tensor produced by an `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation`.

An `Output&lt;T&gt;` is a symbolic handle to a `Tensor&lt;T&gt;`. The value of the tensor is
computed by executing the `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` in a `https://www.tensorflow.org/api_docs/java/org/tensorflow/Session`.

By implementing the `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand` interface, instances of this class also act as operands to
`https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Op` instances.

<br />

<br />

### Public Methods

|---|---|
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#asOutput())() Returns the symbolic handle of a tensor. |
| [DataType](https://www.tensorflow.org/api_docs/java/org/tensorflow/DataType) | [dataType](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#dataType())() Returns the DataType of the tensor referred to by this Output. |
| boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#equals(java.lang.Object))(Object o) |
| int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#hashCode())() |
| int | [index](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#index())() Returns the index into the outputs of the Operation. |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#op())() Returns the Operation that will produce the tensor referred to by this Output. |
| [Shape](https://www.tensorflow.org/api_docs/java/org/tensorflow/Shape) | [shape](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#shape())() Returns the (possibly partially known) shape of the tensor referred to by this Output. |
| [Tensor](https://www.tensorflow.org/api_docs/java/org/tensorflow/Tensor)\<T\> | [tensor](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#tensor())() Returns the tensor at this output. |
| String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output#toString())() |

### Inherited Methods

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface [org.tensorflow.Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)

|---|---|
| abstract [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand#asOutput())() Returns the symbolic handle of a tensor. |

## Public Methods

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\>
**asOutput**
()

Returns the symbolic handle of a tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is
used to obtain a symbolic handle that represents the computation of the input.

<br />

#### public [DataType](https://www.tensorflow.org/api_docs/java/org/tensorflow/DataType)
**dataType**
()

Returns the DataType of the tensor referred to by this Output.

#### public boolean
**equals**
(Object o)

<br />

##### Parameters

| o |   |
|---|---|

#### public int
**hashCode**
()

<br />

#### public int
**index**
()

Returns the index into the outputs of the Operation.

#### public [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation)
**op**
()

Returns the Operation that will produce the tensor referred to by this Output.

#### public [Shape](https://www.tensorflow.org/api_docs/java/org/tensorflow/Shape)
**shape**
()

Returns the (possibly partially known) shape of the tensor referred to by this Output.

#### public [Tensor](https://www.tensorflow.org/api_docs/java/org/tensorflow/Tensor)\<T\>
**tensor**
()

Returns the tensor at this output.

This operation is only supported on the outputs of an operation executed eagerly. For graph
environments, output tensors must be fetched by running a session, using `https://www.tensorflow.org/api_docs/java/org/tensorflow/Session.Runner#fetch(org.tensorflow.Output<?>)`.

<br />

##### Returns

- tensor

##### Throws

| IllegalStateException | if this output results from a graph |
|---|---|

##### See Also

- `https://www.tensorflow.org/api_docs/java/org/tensorflow/EagerSession`

#### public String
**toString**
()

<br />