Tensorflow-RNN-Tutorial icon indicating copy to clipboard operation
Tensorflow-RNN-Tutorial copied to clipboard

There is an error in tf.contrib.seq2seq.dynamic_decode()

Open zjcanjux opened this issue 7 years ago • 2 comments

When I run RNN-TF-dynamic-decode.py, the TypeError occur, TypeError: Input 'y' of 'Equal' Op has type int64 that does not match type int32 of argument 'x'. in tf.contrib.seq2seq.dynamic_decode() line.

zjcanjux avatar Dec 28 '18 01:12 zjcanjux

If your environment is different, like windows and linux, this may be the case.

You can use type cast.

Check your tensorflow version Or upgrade your tensorflow.

hccho2 avatar Feb 17 '19 09:02 hccho2

helper = tf.contrib.seq2seq.TrainingHelper(inputs, np.array([seq_length]*batch_size))

==>

helper = tf.contrib.seq2seq.TrainingHelper(inputs, np.array([seq_length]*batch_size, dtype=np.int32))

hccho2 avatar May 23 '20 12:05 hccho2