我試圖用tfLearn運行lstm
模型,我得到這個錯誤:AttributeError的:模塊 'tensorflow' 有沒有屬性 '解包'
File "...city_names.py", line 16, in <module>
g = tflearn.lstm(g, 256, activation='relu', return_seq=True)
File "...\tflearn\layers\recurrent.py", line 197, in lstm
inference = tf.unpack(inference)
AttributeError: module 'tensorflow' has no attribute 'unpack'
與以下行:
g = tflearn.input_data(shape=[None, maxlen, len(char_idx)])
這些是代碼行:
path = "US_cities.txt"
maxlen = 20
X, Y, char_idx = textfile_to_semi_redundant_sequences(path, seq_maxlen=maxlen, redun_step=3)
g = tflearn.input_data(shape=[None, maxlen, len(char_idx)])
g = tflearn.input_data(shape=[None, maxlen, len(char_idx)])
在tf 1.0中,沒有'unpack'。您可能想使用'unstack'來代替。 – soloice
所以文件recurrent.py沒有被更新。你知道我可以在哪裏得到更新的代碼嗎? – suku
https://www.tensorflow.org/install/migration – soloice