public interface Operand<T extends TType> extends Op, org.tensorflow.ndarray.Shaped
Example usage:
Ops tf = Ops.create();
// The "decodeJpeg" operation can be used as an operand to the "cast" operation
Operand<TUint8> decodeJpeg = tf.image.decodeJpeg(...);
tf.dtypes.cast(decodeJpeg, TFloat32.class);
// The output "y" of the "unique" operation can be used as an operand to the "cast" operation
Output<TInt32> y = tf.unique(...).y();
tf.dtypes.cast(y, TFloat32.class);
// The "split" operation can be used as operand list to the "concat" operation
Iterable<? extends Operand<TFloat32>> split = tf.split(...);
tf.concat(split, tf.constant(0));
Modifier and Type | Method and Description |
---|---|
Output<T> |
asOutput()
Returns the symbolic handle of the tensor.
|
default T |
asTensor()
Returns the tensor at this operand.
|
default org.tensorflow.ndarray.Shape |
shape()
Returns the (possibly partially known) shape of the tensor referred to by the
Output of this operand. |
default Class<T> |
type()
Returns the tensor type of this operand
|
Output<T> asOutput()
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.
OperationBuilder.addInput(Output)
default T asTensor()
IllegalStateException
- if this is an operand of a graphdefault org.tensorflow.ndarray.Shape shape()
Output
of this operand.shape
in interface org.tensorflow.ndarray.Shaped
Copyright © 2015–2022. All rights reserved.