parameters: (op, grad)
return_statement: return [None, None, u_g.flow]
docstring: Gradient for TensorArrayGather.
  
    Args:
      op: Forward TensorArrayGather op.
      grad: Gradient `Tensor` to TensorArrayGather.
  
    Returns:
      A flow `Tensor`, which can be used in control dependencies to
      force the write of `grad` to the gradient `TensorArray`.
docstring_summary: Gradient for TensorArrayGather.
docstring_tokens: Gradient for TensorArrayGather .
function: def _TensorArrayGatherGrad(op, grad):
    """Gradient for TensorArrayGather.
  
    Args:
      op: Forward TensorArrayGather op.
      grad: Gradient `Tensor` to TensorArrayGather.
  
    Returns:
      A flow `Tensor`, which can be used in control dependencies to
      force the write of `grad` to the gradient `TensorArray`.
    """
    # Note: the forward flow dependency in the call to grad() is necessary for
    # the case of dynamic sized TensorArrays.  When creating the gradient
    # TensorArray, the final size of the forward array must be known.
    # For this we need to wait until it has been created by depending on
    # the input flow of the original op.
    handle = op.inputs[0]
    indices = op.inputs[1]
    flow = op.inputs[2]
    dtype = op.get_attr("dtype")
    grad_source = _GetGradSource(grad)
    g = (tensor_array_ops.TensorArray(dtype=dtype, handle=handle, flow=flow,
                                      colocate_with_first_write_call=False)
         .grad(source=grad_source, flow=flow))
    u_g = g.scatter(indices, grad)
    return [None, None, u_g.flow]
function_tokens: def _TensorArrayGatherGrad ( op , grad ) : # Note: the forward flow dependency in the call to grad() is necessary for # the case of dynamic sized TensorArrays.  When creating the gradient # TensorArray, the final size of the forward array must be known. # For this we need to wait until it has been created by depending on # the input flow of the original op. handle = op . inputs [ 0 ] indices = op . inputs [ 1 ] flow = op . inputs [ 2 ] dtype = op . get_attr ( "dtype" ) grad_source = _GetGradSource ( grad ) g = ( tensor_array_ops . TensorArray ( dtype = dtype , handle = handle , flow = flow , colocate_with_first_write_call = False ) . grad ( source = grad_source , flow = flow ) ) u_g = g . scatter ( indices , grad ) return [ None , None , u_g . flow ]