1
$\begingroup$

I am trying to build a RNN model to classify time series. My time series data consist of numbers with length 200.

I am using tensorflow, and when i create the placeholder for the data it is like this:

inputs = tf.placeholder(tf.float32, [None, 200, 1], name='inputs')

200 is the sequence length and 1 is the features, which in my case is 1 feature per time step.

And when i create the RNN using GRU cell i use this:

tf.contrib.rnn.GRUCell(400)

I use 400 as cell size of GRU cell because as far as i know the internal state + the inputs will be used as the new input for the next GRU cell, so i suppose the cell must be input length x 2.

Is this logic of mine correct? Is the initialization of inputs correct?

BATCH SIZE = None

SEQUENCE LENGTH = 200

FEATURES = 1

And is the GRU cell parameters correct?

CELL SIZE = 2 x SEQUENCE LENGTH?

Or have i understood it incorrectly?

$\endgroup$
1
  • $\begingroup$ Would you share your code? It is hard to see your situation. Also please put reference that cell size should be sequence length double. $\endgroup$
    – Cloud Cho
    Jul 23, 2019 at 1:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.