question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object duplication in MultiRNNCell declaration

See original GitHub issue

Hi spiglerg!

First off, I want to say that your code has helped me become much more familiar with the RNN framework inside of Tensorflow. Thank you!

I noticed that on line 47 of rnn_tf.py you create a two-element list of LSTM cells by saying: [self.lstm_cell]*self.num_layers Which creates a list of two of the exact same TF objects. Since each TF object has its own set of trainable parameters, won’t duplicating the same TF object cause the network to have two layers of LSTM cells that have the exact same parameters?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
spiglergcommented, Feb 24, 2017

I don’t think it’s a problem as BasicLSTMCell parameters are initialized within their call function, which is only called from dynamic_run().

0reactions
spiglergcommented, Mar 17, 2017

Awesome. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

WARNING:tensorflow:Entity <bound method MultiRNNCell ...
python.ops.rnn_cell_impl.MultiRNNCell object at 0x0000025328A10860>> could not be transformed and will be executed as-is #32949.
Read more >
tf.compat.v1.nn.rnn_cell.MultiRNNCell | TensorFlow v2.11.0
If True, accepted and returned states are n-tuples, where n = len(cells) . If False, the states are all concatenated along the column...
Read more >
How to use AttentionMechanism with MultiRNNCell and ...
Have you tried using the attention wrapper provided by tf.contrib? Here is an example using both an attention wrapper and dropout:
Read more >
Recurrent Neural Networks in Tensorflow II - R2RT
Here is the formal statement of our model from last time: ... Recall from last post that we represented each duplicate tensor of...
Read more >
MultiRNNCell' object is not iterable Python Tensorflow
I am trying to add the weights and biases to tensorboard according to the layers. The following way I tried:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found