A symbolic handle to a tensor produced by an Operation
.
An Output<T>
is a symbolic handle to a Tensor<T>
. The value of the tensor is
computed by executing the Operation
in a Session
.
By implementing the Operand
interface, instances of this class also act as operands to
ERROR(Op/org.tensorflow.op.Op Op)
instances.
Public Methods
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
DataType |
dataType()
Returns the DataType of the tensor referred to by this Output.
|
boolean |
equals(Object o)
|
int |
hashCode()
|
int |
index()
Returns the index into the outputs of the Operation.
|
Operation |
op()
Returns the Operation that will produce the tensor referred to by this Output.
|
Shape |
shape()
Returns the (possibly partially known) shape of the tensor referred to by this Output.
|
Tensor<T> |
tensor()
Returns the tensor at this output.
|
String |
toString()
|
Inherited Methods
Public Methods
public 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.
public boolean equals (Object o)
Parameters
o |
---|
public int hashCode ()
public int index ()
Returns the index into the outputs of the Operation.
public Operation op ()
Returns the Operation that will produce the tensor referred to by this Output.
public Shape shape ()
Returns the (possibly partially known) shape of the tensor referred to by this Output.
public 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 fetch(Output)
.
Returns
- tensor
Throws
IllegalStateException | if this output results from a graph |
---|