# tf.raw_ops.TensorArrayGradWithShape

<br />

Creates a TensorArray for storing multiple gradients of values in the given handle.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.TensorArrayGradWithShape`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/TensorArrayGradWithShape)

<br />

    tf.raw_ops.TensorArrayGradWithShape(
        handle, flow_in, shape_to_prepend, source, name=None
    )

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.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `handle` | A `Tensor` of type `resource`. The handle to the forward TensorArray. |
| `flow_in` | A `Tensor` of type `float32`. A float scalar that enforces proper chaining of operations. |
| `shape_to_prepend` | A `Tensor` of type `int32`. 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` | A `string`. The gradient source string, used to decide which gradient TensorArray to return. |
| `name` | A name for the operation (optional). |

<br />

<br />

| ## Returns ||
|---|---|
| A tuple of `Tensor` objects (grad_handle, flow_out). ||
| `grad_handle` | A `Tensor` of type `resource`. |
| `flow_out` | A `Tensor` of type `float32`. |

<br />