Skip to content Skip to sidebar Skip to footer

Tensorflow Rnn Slice Error

I am attempting to create a multilayered RNN using LSTMs in tensorflow. I am using Tensorflow version 0.9.0 and python 2.7 on Ubuntu 14.04. However, I keep getting the following er

Solution 1:

I'm not sure why this worked but, I added in a dropout wrapper. i.e.

if Training:
    cell = rnn_cell.DropoutWrapper(cell,output_keep_prob=config.keep_prob)

And now it works. This works for both LSTM and GRU cells.

Solution 2:

This problem is occurring because you have increased layer of your GRU cell but your initial vector is not doubled. If your initial_vector size is [batch_size,50].

Then initial_vector = tf.concat(1,[initial_vector]*num_layers)

Now input this to decoder as initial vector.

Post a Comment for "Tensorflow Rnn Slice Error"