-
Notifications
You must be signed in to change notification settings - Fork 74k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the use of MultiRNNCell? #7604
Comments
Yes, you'll get separate trainable weights by repeating the list like you're doing. It's a bit confusing to be honest. You should have asked this here or on StackOverflow though. |
@ebrevdo, do you think we should change the docs in some way to make it clearer? |
This is indeed confusing and hopefully next week we'll have a push (over a
month in the making) that disallows this behavior. It's a bit out of scope
of this bug to describe why this behavior is the way it is, but it's been
the TF standard for a long time. But after this change, you'll have to
write:
MultiRNNCell([BasicLSTMCell(10) for _ in range(3)])
otherwise you will get an error when calling dynamic_rnn.
With this version of the code, you end up creating 3 separate BasicLSTMCell
instances, each of which expects to maintain its own parameters.
…On Fri, Feb 17, 2017 at 3:04 PM, Andrew Selle ***@***.***> wrote:
@ebrevdo <https://github.com/ebrevdo>, do you think we should change the
docs in some way to make it clearer?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7604 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtim34fMLpVWgZprthmv-Wuv274ysr3ks5rdidxgaJpZM4MD1hN>
.
|
thank you very much ~ |
Don't forget to close your issue @liuyichaosoftware. 👍 |
Tensorflow 0.9 to 1.0.1 is a big jump. A lot changed. In tf 1.0.0, the API has been changed such as: tf.nn.seq2seq.sequence_loss_by_example tf.nn.rnn_cell. tf.nn.rnn_cell.MultiRNNCell( ... |
How to find the API map between the old and new version @tifoit |
doc is in https://www.tensorflow.org/tutorials/recurrent
I found the line
stacked_lstm = tf.contrib.rnn.MultiRNNCell([lstm] * number_of_layers,
I need to use MultiRNNCell
but,I write those lines
a = [tf.nn.rnn_cell.BasicLSTMCell(10)]*3
print id(a[0]), id(a[1])
Its output is 4648063696 4648063696
can MultiRNNCell use the same object BasicLSTMCell as a list for parameter?
The text was updated successfully, but these errors were encountered: