# tf.keras.backend.map_fn

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/backend/map_fn) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/keras/backend.py#L5791-L5804) |

Map the function fn over the elements elems and return the outputs.

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.keras.backend.map_fn`](https://www.tensorflow.org/api_docs/python/tf/keras/backend/map_fn)

<br />

    tf.keras.backend.map_fn(
        fn, elems, name=None, dtype=None
    )

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `fn` | Callable that will be called upon each element in elems |
| `elems` | tensor |
| `name` | A string name for the map node in the graph |
| `dtype` | Output data type. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Tensor with dtype `dtype`. ||

<br />