UnbatchGrad

public final class UnbatchGrad

Gradient of Unbatch.

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.

Nested Classes

class UnbatchGrad.Options Optional attributes for UnbatchGrad  

Public Methods

Output<T>
asOutput()
Returns the symbolic handle of a tensor.
Output<T>
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, Options... options)
Factory method to create a class wrapping a new UnbatchGrad operation.
static UnbatchGrad.Options
sharedName(String sharedName)

Inherited Methods

Public Methods

public Output<T> asOutput ()

Returns the symbolic handle of a tensor.

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.

public Output<T> batchedGrad ()

public static UnbatchGrad.Options container (String container)

public static UnbatchGrad<T> create (Scope scope, Operand<T> originalInput, Operand<Long> batchIndex, Operand<T> grad, Operand<Long> id, Options... options)

Factory method to create a class wrapping a new UnbatchGrad operation.

Parameters
scope current scope
options carries optional attributes values
Returns
  • a new instance of UnbatchGrad

public static UnbatchGrad.Options sharedName (String sharedName)