我正在尝试让g2p-seq2seq按照github指令工作:https://github.com/cmusphinx/g2p-seq2seq
但是,当我尝试使用$ g2p-seq2seq --interactive --model g2p-seq2seq-cmudict
验证安装时,出现以下错误
Traceback (most recent call last):
File "/usr/local/bin/g2p-seq2seq", line 11, in <module>
load_entry_point('g2p-seq2seq==5.0.0a0', 'console_scripts', 'g2p-seq2seq')()
File "build/bdist.macosx-10.12-intel/egg/g2p_seq2seq/app.py", line 82, in main
File "build/bdist.macosx-10.12-intel/egg/g2p_seq2seq/g2p.py", line 96, in load_decode_model
File "build/bdist.macosx-10.12-intel/egg/g2p_seq2seq/seq2seq_model.py", line 121, in __init__
AttributeError: 'module' object has no attribute 'core_rnn_cell'
当我检查121行上的seq2seq_model.py脚本时,我可以看到下面这一行:
single_cell = tf.contrib.rnn.core_rnn_cell.GRUCell(size)
tf.contrib.rnn似乎没有这个函数core_rnn_cell。我怎么才能让它工作呢?我运行的是Python 2.7,Tensorflow 1.4
发布于 2017-11-04 11:42:03
我不得不将tensorflow版本降级到1.0才能正常工作。
发布于 2018-04-27 09:31:33
我在使用Tensorflow 1.3版本时遇到了同样的问题。
当我切换的时候:
'single_cell = tf.contrib.rnn.core_rnn_cell.GRUCell(size)'
至
= 'tf.contrib.rnn.GRUCell(size)'
啊,真灵。
https://stackoverflow.com/questions/47108856
复制