harpribot / deep-summarization

Uses Recurrent Neural Network (LSTM/GRU/basic_RNN units) for summarization of amazon reviews
MIT License
132 stars 47 forks source link

On Windows getting value error #3

Open siddhartha-mukherjee-india opened 7 years ago

siddhartha-mukherjee-india commented 7 years ago

I have installed tensorflow on windows (with Anaconda) and trying to run on windows.

command : python train_scripts/train_script_gru_simple_no_attn.py

ValueError: Attempt to reuse RNNCell <tensorflow.contrib.rnn.python.ops.core_rnn_cell_impl.GRUCell object at 0x000002063DDCBBE0> with a different variable scope than its first use. First use of cell was with scope 'train_test/embedding_rnn_seq2seq/embedding_rnn_decoder/rnn_decoder/gru_cell', this attempt is with scope 'train_test/embedding_rnn_seq2seq/rnn/gru_cell'. Please create a new instance of the cell if you would like it to use a different set of weights. If before you were using: MultiRNNCell([GRUCell(...)] * numlayers), change to: MultiRNNCell([GRUCell(...) for in range(num_layers)]). If before you were using the same cell instance as both the forward and reverse cell of a bidirectional RNN, simply create two instances (one for forward, one for reverse). In May 2017, we will start transitioning this cell's behavior to use existing stored weights, if any, when it is called with scope=None (which can lead to silent model degradation, so this error will remain until then.)

Please help

siddhartha-mukherjee-india commented 7 years ago

Moreover I was getting the below error:

AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'seq2seq'

So I converted to 'tf.nn' to 'tf.contrib'

abhi1092 commented 7 years ago

Install the old version of tensorflow. More specifically tensorflow==0.12.0rc0. pip install tensorflow==0.12.0rc0

bjprogrammer commented 7 years ago

I am also getting this error- AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'seq2seq' tensorflow version- 0.12.0rc0

bjprogrammer commented 7 years ago

So I also converted 'tf.nn' to 'tf.contrib.legacy_seq2seq' But now I am getting- typeerror can't pickle notimplementedtype object

Please help

Affanamin commented 6 years ago

I also stuck here and getting an error as "module 'tensorflow.python.ops.nn' has no attribute 'seq2seq' ". Any one with the solution, please help

Affanamin commented 6 years ago

This issue was resolved by inserting "tf.contrib.legacy_seq2seq.embedding_rnn_seq2seq" instead of "module 'tensorflow.python.ops.nn'" in project