zsdonghao / text-to-image

Generative Adversarial Text to Image Synthesis / Please Star -->
https://github.com/zsdonghao/tensorlayer
598 stars 162 forks source link

Attempt to have a second RNNCell use the weights of a variable scope that already has weights #2

Closed flsd201983 closed 7 years ago

flsd201983 commented 7 years ago

I got a problem, how can I solve it?

Attempt to have a second RNNCell use the weights of a variable scope that already has weights: 'rnnftxt/rnn/dynamic/rnn/basic_lstm_cell'; and the cell was not constructed as BasicLSTMCell(..., reuse=True). To share the weights of an RNNCell, simply reuse it in your second calculation, or create a new one with the argument reuse=True.

zsdonghao commented 7 years ago

simply add cell_init_args = {'state_is_tuple' : True, 'reuse': reuse} into DynamicRNNLayer if you are using TF1.1