Grzego / handwriting-generation

Implementation of handwriting generation with use of recurrent neural networks in tensorflow. Based on Alex Graves paper (https://arxiv.org/abs/1308.0850).
MIT License
531 stars 107 forks source link

Tensorflow2.x version compatible #25

Open vigneswaran-chandrasekaran opened 3 years ago

vigneswaran-chandrasekaran commented 3 years ago

Thank you for this great work :)

When I try to run the code, I am getting many errors because of new TensorFlow 2.x changes. So, I tried to use tf_upgrade_v2 script, but still, I get an error and not sure how to proceed,

More specifically: Substructure "type=LSTMStateTuple str=LSTMStateTuple(c=<tf.Tensor 'rnn/rnn_model/lstm_0/lstm_cell/add_1:0' shape=(64, 400) dtype=float32>, h=<tf.Tensor 'rnn/rnn_model/lstm_0/lstm_cell/mul_2:0' shape=(64, 400) dtype=float32>)" is a sequence, while substructure "type=ResourceVariable str=<tf.Variable 'model/rnn/Variable:0' shape=(64, 400) dtype=float32>" is not
Entire first structure:
[., (.,), [LSTMStateTuple(c=., h=.), LSTMStateTuple(c=., h=.), LSTMStateTuple(c=., h=.), ., ., .]]
Entire second structure:
[., (.,), [., ., ., ., ., ., ., ., .]]

It would be great if anyone give comments to reproduce this work in Tensorflow2.x

alexrintt commented 2 years ago

Got through same path and I only could run by downgrading tf version to 13.1.2 as mentioned in #27.

vigneswaran-chandrasekaran commented 2 years ago

I have modified to make Tensorflow2.x compatible https://github.com/Vigneswaran-Chandrasekaran/rnn_handwriting_generation