T - data type for sum() output@Operator public final class AccumulateNV2<T> extends PrimitiveOp implements Operand<T>
`tf.accumulate_n_v2` performs the same operation as `tf.add_n`, but does not wait for all of its inputs to be ready before beginning to sum. This can save memory if inputs are ready at different times, since minimum temporary storage is proportional to the output size rather than the inputs size.
Unlike the original `accumulate_n`, `accumulate_n_v2` is differentiable.
Returns a `Tensor` of same shape and type as the elements of `inputs`.
operation| Modifier and Type | Method and Description |
|---|---|
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T> AccumulateNV2<T> |
create(Scope scope,
Operand<T> inputs,
Shape shape)
Factory method to create a class to wrap a new AccumulateNV2 operation to the graph.
|
Output<T> |
sum() |
equals, hashCode, toStringpublic static <T> AccumulateNV2<T> create(Scope scope, Operand<T> inputs, Shape shape)
scope - current graph scopeinputs - A list of `Tensor` objects, each with same shape and type.shape - Shape of elements of `inputs`.public Output<T> 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<T>OperationBuilder.addInput(Output)Copyright © 2015–2019. All rights reserved.