# \`nodes.Batcher\` on multiple outputs

**URL:** <https://discuss.pytorch.org/t/nodes-batcher-on-multiple-outputs/218482>\
**Category:** data\
**Created:** [April 1, 2025, 9:22am UTC](https://discuss.pytorch.org/t/nodes-batcher-on-multiple-outputs/218482 "2025-04-01T09:22:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/p/e9a140/32.png) [@pascal](https://discuss.pytorch.org/u/pascal)\
**Post date:** [April 1, 2025, 9:22am UTC](https://discuss.pytorch.org/t/nodes-batcher-on-multiple-outputs/218482/1 "2025-04-01T09:22:26Z")

</div>

I am using `nodes.Batcher` on a node with multiple outputs.

```auto
from torchdata.nodes import Batcher, IterableWrapper, Loader, Mapper

node = IterableWrapper(range(16))
node = Mapper(node, map_fn=lambda x: (x, x**2))
node = Batcher(node, batch_size=4)
loader = Loader(node)
print(list(loader))

```

This results in batches of tuples (`[(0, 0), (1, 1), (2, 4), (3, 9)]`) instead of tuples of batches. What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![pascal](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/p/e9a140/32.png) [@pascal](https://discuss.pytorch.org/u/pascal)\
**Post date:** [April 1, 2025, 3:05pm UTC](https://discuss.pytorch.org/t/nodes-batcher-on-multiple-outputs/218482/2 "2025-04-01T15:05:59Z")

</div>

I am missing a call to `default_collate` after batching.
