guillaume-chevalier / seq2seq-signal-prediction

Signal forecasting with a Sequence-to-Sequence (seq2seq) Recurrent Neural Network (RNN) model in TensorFlow - Guillaume Chevalier
Apache License 2.0
1.08k stars 294 forks source link

Error when re-running training cell in notebook with TensorFlow 1.10.0 #10

Closed edgriebel closed 4 years ago

edgriebel commented 5 years ago

In the "# Training loss and optimizer" cell, I get errors when running this cell multiple times:

ValueError: Variable Optimizer/Seq2seq/basic_rnn_seq2seq/rnn/multi_rnn_cell/cell_0/gru_cell/gates/kernel/RMSProp/ already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:

  File "<ipython-input-6-91660717991c>", line 20, in <module>
    train_op = optimizer.minimize(loss)
  File "/home/eegriebe/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2961, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/home/eegriebe/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2901, in run_ast_nodes
    if self.run_code(code, result):
guillaume-chevalier commented 4 years ago

Updated to TF v2.