# Simple Flux LSTM for Time Series

**URL:** <https://discourse.julialang.org/t/simple-flux-lstm-for-time-series/35494>\
**Category:** Machine Learning\
**Tags:** question, flux, time-series, machine-learning\
**Created:** [March 4, 2020, 1:10am UTC](https://discourse.julialang.org/t/simple-flux-lstm-for-time-series/35494 "2020-03-04T01:10:12Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![reemmasoud123](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/reemmasoud123/32/26181_2.png) [@reemmasoud123](https://discourse.julialang.org/u/reemmasoud123)\
**Post date:** [June 20, 2021, 3:33pm UTC](https://discourse.julialang.org/t/simple-flux-lstm-for-time-series/35494/24 "2021-06-20T15:33:19Z")

</div>

> [@LSTM training for a sequence of multiple features using a batch size 30](https://discourse.julialang.org/t/lstm-training-for-a-sequence-of-multiple-features-using-a-batch-size-30/63238):
>
> I am trying to do batch training using LSTM for a time series data with multiple features. Assuming I have 5000 samples and 5 features for each sample. The input uses 14 days into the past and the output is a single value on the 15th day. (My time step is 14). The size of my data is the following: xtrain: (5000,14,5) ytrain: (5000,1,1) My model is below. How do I train my data by using a batch size of 30? I tried using DataLoader and Flux.train but they are both not working with this input s…

I posted a question in the above link with the details.

---

_[View the full topic](https://discourse.julialang.org/t/simple-flux-lstm-for-time-series/35494)._
