# What is "splatting" in flux (loss?)?

**URL:** <https://discourse.julialang.org/t/what-is-splatting-in-flux-loss/37548>\
**Category:** Machine Learning\
**Created:** [April 14, 2020, 5:45am UTC](https://discourse.julialang.org/t/what-is-splatting-in-flux-loss/37548 "2020-04-14T05:45:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaynick](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Post date:** [April 14, 2020, 5:45am UTC](https://discourse.julialang.org/t/what-is-splatting-in-flux-loss/37548/1 "2020-04-14T05:45:52Z")

</div>

In the [Flux docs for `train!`](https://fluxml.ai/Flux.jl/stable/training/training/#Flux.Optimise.train!) it says

> In case datapoints `d` are of numeric array type, assume no splatting is needed and compute the gradient of `loss(d)` .

What does “splatting” mean here?

I am _guessing_ that what this means is that, if the data are expressed as matrices (dimensions X datapoints) or maybe the other way around, the loss function can be written to operate on multiple datapoints at once. Is this correct?

If so, then does Flux _assume_ that if the data are in a matrix, that the loss must operate on the whole matrix at once?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 14, 2020, 6:16am UTC](https://discourse.julialang.org/t/what-is-splatting-in-flux-loss/37548/2 "2020-04-14T06:16:04Z")

</div>

It may not be specific to Flux, just the splat operator [`...`](https://docs.julialang.org/en/v1/base/base/#...).

---

<div class="post-metadata">

**Author:** ![jaynick](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Post date:** [April 29, 2020, 8:34pm UTC](https://discourse.julialang.org/t/what-is-splatting-in-flux-loss/37548/3 "2020-04-29T20:34:04Z")

</div>

ok my guess was completely wrong…

did not know the “…” is called splat, was thinking it had something to with gather/scatter
