@Operator public final class TensorArrayGradWithShape extends PrimitiveOp
Similar to TensorArrayGradV3. However it creates an accumulator with an expanded shape compared to the input TensorArray whose gradient is being computed. This enables multiple gradients for the same TensorArray to be calculated using the same accumulator.
operation| Modifier and Type | Method and Description |
|---|---|
static TensorArrayGradWithShape |
create(Scope scope,
Operand<?> handle,
Operand<Float> flowIn,
Operand<Integer> shapeToPrepend,
String source)
Factory method to create a class to wrap a new TensorArrayGradWithShape operation to the graph.
|
Output<Float> |
flowOut() |
Output<?> |
gradHandle() |
equals, hashCode, toStringpublic static TensorArrayGradWithShape create(Scope scope, Operand<?> handle, Operand<Float> flowIn, Operand<Integer> shapeToPrepend, String source)
scope - current graph scopehandle - The handle to the forward TensorArray.flowIn - A float scalar that enforces proper chaining of operations.shapeToPrepend - An int32 vector representing a shape. Elements in the gradient accumulator will
have shape which is this shape_to_prepend value concatenated with shape of the
elements in the TensorArray corresponding to the input handle.source - The gradient source string, used to decide which gradient TensorArray
to return.public Output<?> gradHandle()
Copyright © 2015–2019. All rights reserved.