domerin0 / rnn-speech

Character level speech recognizer using ctc loss with deep rnns in TensorFlow.
MIT License
77 stars 31 forks source link

tensorflow=1.4 #46

Closed chenting0324 closed 6 years ago

chenting0324 commented 6 years ago

Hi~ I want to train the model, and I use tensorflow 1.4,but I encountered a problem as follows AttributeError: type object 'Iterator' has no attribute 'from_dataset' Then I saw the sentence "Remove tf.contrib.data.Iterator.from_dataset() method. Use Dataset.make_initializable_iterator() instead." from https://github.com/tensorflow/tensorflow/releases/tag/v1.4.0 So modified the code as follows as follows: t_iterator = tf.data.Dataset.make_initializable_iterator(train_dataset) v_iterator = tf.data.Dataset.make_initializable_iterator(valid_dataset) but I still encounter problem like this: Use tf.data.Dataset.zip(). Traceback (most recent call last): File "stt.py", line 315, in main() File "stt.py", line 30, in main train_rnn(train_set, test_set, hyper_params, prog_params) File "stt.py", line 127, in train_rnn model, t_iterator, v_iterator = build_training_rnn(sess, hyper_params, prog_params, train_set, test_set) File "stt.py", line 66, in build_training_rnn model.add_tensorboard(sess, hyper_params["tensorboard_dir"], prog_params["tb_name"], prog_params["timeline"]) File "/Users/cx/rnn-speech/models/AcousticModel.py", line 488, in add_tensorboard self.summary_writer_op = tf.summary.FileWriter(tensorboard_dir + '/' + run_name + '/', graph=session.graph) TypeError: unsupported operand type(s) for +: 'NoneType' and 'str

So I want to know that Do you run your code in tensorflow1.4?

AMairesse commented 6 years ago

Hi, I haven’t looked in TF 1.4 for now. There is at least a big change about datasets which are not in contrib anymore. For now you should probably stick with 1.3 if you want to avoid troubles. Of course pull requests to switch to 1.4 are welcome ! :-) Antoine.

AMairesse commented 6 years ago

Hi, Master branch will now work with TF 1.4. Antoine