parameters: (op, grad)
return_statement: return [None, None, w_g.flow]
docstring: Gradient for TensorArrayRead.
  
    Args:
      op: Forward TensorArrayRead op.
      grad: Gradient `Tensor` to TensorArrayRead.
  
    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 TensorArrayRead.
docstring_tokens: Gradient for TensorArrayRead .
function: def _TensorArrayReadGrad(op, grad):
    """Gradient for TensorArrayRead.
  
    Args:
      op: Forward TensorArrayRead op.
      grad: Gradient `Tensor` to TensorArrayRead.
  
    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]
    index = 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).grad(
        source=grad_source, flow=flow)
    w_g = g.write(index, grad)
    return [None, None, w_g.flow]
function_tokens: def _TensorArrayReadGrad ( 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 ] index = 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 ) . grad ( source = grad_source , flow = flow ) w_g = g . write ( index , grad ) return [ None , None , w_g . flow ]