aymericdamien / TensorFlow-Examples

TensorFlow Tutorial and Examples for Beginners (support TF v1 & v2)
Other
43.39k stars 14.94k forks source link

Dynamic RNN for time series prediction issue #134

Open lucasjinreal opened 7 years ago

lucasjinreal commented 7 years ago

In tutorial about rnn, using toy data implements classify 2 classes dummy series, what if we predict on time series data with only one series? Say:

[1.2, 1.1, 1.1, 1.3, 1.4, 1.5, 1.3..]

I run the code but simple got confused by the error. the input shape of dynamic rnn should be 3 dimension, however with only one series, I can only get like this:

[[1.2, 1.1, 1.1],
[1.1, 1.1, 1.3],
...
]

which is 2 dimension, how to feed such data into dynamic rnn?

deepakmeena635 commented 5 years ago

3 dimensions being, [batch_size, time_steps, input_features] in your case : , input_features = 1, just expand the last dimension