U - data type for output() output@Operator public final class Fill<U> extends PrimitiveOp implements Operand<U>
This operation creates a tensor of shape `dims` and fills it with `value`.
For example:
# Output tensor has shape [2, 3].
fill([2, 3], 9) ==> [[9, 9, 9]
[9, 9, 9]]
`tf.fill` differs from `tf.constant` in a few ways:
operation| Modifier and Type | Method and Description |
|---|---|
Output<U> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <U,T extends Number> |
create(Scope scope,
Operand<T> dims,
Operand<U> value)
Factory method to create a class wrapping a new Fill operation.
|
Output<U> |
output() |
equals, hashCode, op, toStringpublic static <U,T extends Number> Fill<U> create(Scope scope, Operand<T> dims, Operand<U> value)
scope - current scopedims - 1-D. Represents the shape of the output tensor.value - 0-D (scalar). Value to fill the returned tensor.
public Output<U> asOutput()
OperandInputs 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.
asOutput in interface Operand<U>OperationBuilder.addInput(Output)Copyright © 2022. All rights reserved.