# tf.raw_ops.MapDefun

<br />

Maps a function on the list of tensors unpacked from arguments on dimension 0.

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.raw_ops.MapDefun(
        arguments,
        captured_inputs,
        output_types,
        output_shapes,
        f,
        max_intra_op_parallelism=1,
        name=None
    )

The function given by `f` is assumed to be stateless, and is executed
concurrently on all the slices; up to batch_size (i.e. the size of the 0th
dimension of each argument) functions will be scheduled at once.

The `max_intra_op_parallelism` attr, which defaults to 1, can be used to
limit the intra op parallelism. To limit inter-op parallelism, a user can
set a private threadpool on the dataset using [`tf.data.Options`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/data/Options)'s
`ThreadingOptions`.

Note that this op is not exposed to users directly, but is invoked in tf.data
rewrites.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `arguments` | A list of `Tensor` objects. A list of tensors whose types are `Targuments`, corresponding to the inputs the function should be mapped over. |
| `captured_inputs` | A list of `Tensor` objects. A list of tensors whose types are `Tcaptured`, corresponding to the captured inputs of the defun. |
| `output_types` | A list of `tf.DTypes` that has length `>= 1`. A list of types. |
| `output_shapes` | A list of shapes (each a [`tf.TensorShape`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/TensorShape) or list of `ints`) that has length `>= 1`. A list of shapes. |
| `f` | A function decorated with @Defun. |
| `max_intra_op_parallelism` | An optional `int`. Defaults to `1`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A list of `Tensor` objects of type `output_types`. ||

<br />