Reputation: 251
I am trying to reproduce the seq2seq model from this repo: https://github.com/llSourcell/seq2seq_model_live/blob/master/2-seq2seq-advanced.ipynb I have a probleme with the rnn function In [13]: bidirectional_dynamic_rnn
I get this error: TypeError: Tensors in list passed to 'values' of 'ConcatV2' Op have types [float32, float64] that don't all match. is it because deprecated function in Tensorflow 1.0, or this is a problem with the script or a problem of deprecation can someone help
Upvotes: 0
Views: 1794
Reputation: 58
I dont have enough rep to add a comment, have had the same problem.
tf.nn.embedding_lookup(embeddings, encoder_inputs)
will cast you're embeddings to tf.float64, which was what was caussing the concat between float32 and float64 error. I solved it by replacing above with
tf.nn.embedding_lookup(embeddings, encoder_inputs)
tf.cast(encoder_inputs_embedded,tf.float32)
and also casting the embeddings variable to float32 (assuming its a numpy array).
Upvotes: 3