write-rnn-tensorflow icon indicating copy to clipboard operation
write-rnn-tensorflow copied to clipboard

ValueError: Trying to share variable rnnlm/multi_rnn_cell/cell_0/basic_lstm_cell/kernel, but specified shape (512, 1024) and found shape (259, 1024).

Open lxtGH opened this issue 8 years ago • 3 comments

When I run train.py, got this errors. I think is kind of version problems, my tf version is 1.3

File "/home/lxt/tf_project/HyperNetwork/write-rnn-tensorflow/model.py", line 50, in init outputs, state_out = tf.contrib.legacy_seq2seq.rnn_decoder(inputs, self.state_in, cell, loop_function=None, scope='rnnlm') File "/home/lxt/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 152, in rnn_decoder output, state = cell(inp, state)

lxtGH avatar Oct 26 '17 13:10 lxtGH

I have came across the same problem

o0starshine0o avatar Oct 31 '17 08:10 o0starshine0o

I have the same error, while running sample.py, also using tf 1.3.0

yaylinda avatar Nov 06 '17 17:11 yaylinda

I got this error as well but I think it was fixed by changing cell = tf.contrib.rnn.MultiRNNCell([get_cell() for _ in range(args.rnn_size)]) to cell = tf.contrib.rnn.MultiRNNCell([get_cell() for _ in range(args.num_layers)]) in model.py.

This was implemented in PRs https://github.com/hardmaru/write-rnn-tensorflow/pull/28 or https://github.com/hardmaru/write-rnn-tensorflow/pull/30 and is now part of master

grisaitis avatar Feb 12 '18 18:02 grisaitis