# What datatypes can you pass into train!

**URL:** <https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377>\
**Category:** Machine Learning\
**Created:** [June 17, 2019, 7:29pm UTC](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377 "2019-06-17T19:29:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stu/32/8772_2.png) [@stu](https://discourse.julialang.org/u/stu)\
**Post date:** [June 17, 2019, 7:29pm UTC](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377/1 "2019-06-17T19:29:49Z")

</div>

cannot find good documentation of this anywhere

---

<div class="post-metadata">

**Author:** ![stu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stu/32/8772_2.png) [@stu](https://discourse.julialang.org/u/stu)\
**Post date:** [June 17, 2019, 8:48pm UTC](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377/2 "2019-06-17T20:48:56Z")

</div>

as far as I can tell, it must be an array of arrays where each array is of only one dimension

---

<div class="post-metadata">

**Author:** ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Post date:** [June 17, 2019, 11:20pm UTC](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377/3 "2019-06-17T23:20:44Z")

</div>

It can be anything that’s iterable, where each iterated element is also iterable (so an array of arrays works), and the iterated elements will just be splatted into the loss function. If you look at the definition of `train!`, this should be pretty obvious: [https://github.com/FluxML/Flux.jl/blob/b47238eb7447311e009a2413a317f7216fe54d12/src/optimise/train.jl#L69](https://github.com/FluxML/Flux.jl/blob/b47238eb7447311e009a2413a317f7216fe54d12/src/optimise/train.jl#L69)

---

<div class="post-metadata">

**Author:** ![stu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stu/32/8772_2.png) [@stu](https://discourse.julialang.org/u/stu)\
**Post date:** [June 18, 2019, 7:02pm UTC](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377/4 "2019-06-18T19:02:10Z")

</div>

I took a look at that but it was not obvious to me, likely since I am still pretty new to Julia
