T - data type for batchedGrad() output@Operator public final class UnbatchGrad<T> extends PrimitiveOp implements Operand<T>
Acts like Batch but using the given batch_index index of batching things as they become available. This ensures that the gradients are propagated back in the same session which did the forward pass.
original_input: The input to the Unbatch operation this is the gradient of. batch_index: The batch_index given to the Unbatch operation this is the gradient of. grad: The downstream gradient. id: The id scalar emitted by Batch. batched_grad: The return value, either an empty tensor or the batched gradient. container: Container to control resource sharing. shared_name: Instances of UnbatchGrad with the same container and shared_name are assumed to possibly belong to the same batch. If left empty, the op name will be used as the shared name.
| Modifier and Type | Class and Description |
|---|---|
static class |
UnbatchGrad.Options
Optional attributes for
UnbatchGrad |
operation| Modifier and Type | Method and Description |
|---|---|
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
Output<T> |
batchedGrad() |
static UnbatchGrad.Options |
container(String container) |
static <T> UnbatchGrad<T> |
create(Scope scope,
Operand<T> originalInput,
Operand<Long> batchIndex,
Operand<T> grad,
Operand<Long> id,
UnbatchGrad.Options... options)
Factory method to create a class to wrap a new UnbatchGrad operation to the graph.
|
static UnbatchGrad.Options |
sharedName(String sharedName) |
equals, hashCode, toStringpublic static <T> UnbatchGrad<T> create(Scope scope, Operand<T> originalInput, Operand<Long> batchIndex, Operand<T> grad, Operand<Long> id, UnbatchGrad.Options... options)
scope - current graph scopeoriginalInput - batchIndex - grad - id - options - carries optional attributes valuespublic static UnbatchGrad.Options container(String container)
container - public static UnbatchGrad.Options sharedName(String sharedName)
sharedName - 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.