0

Actually, I want to generate sequences just like the thing that Alex Grave's did. I have the implementation of tensorflow. At the same time, I want to try the attention-based seq2seq model to generate the handwriting. So about the decoder, I did it with tf.nn.dynamic_rnn, it works. Now, I want to use the attentiom-based in tensorflow, so I want to change that to tf.contrib.seq2seq.dynamic_decode. But I get the error below:

TypeError: Cannot convert a list containing a tensor of dtype <dtype: 'int32'> to <dtype: 'float32'> (Tensor is: <tf.Tensor 'vector_rnn/DEC_RNN/transpose_1:0' shape=(100, ?) dtype=int32>)

I check the API documents of both of them. tf.nn.dynamic tf.contrib.seq2seq.dynamic.decode About the return of them, I did not get any idea to solve this error.

If you get any idea, please tell me! I would appreciate it very much.

Lily.chen
  • 119
  • 1
  • 8

1 Answers1

0

Actually, it works if I use the tf.nn.dynamic_rnn to code the attention layers in decoder of VAE, just different with the tf.contrib.seq2seq.dynamic_decode.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Lily.chen
  • 119
  • 1
  • 8