I have a block that creates an LSTM Model for me. I want to iterate on this block and every time pass a new data to it as an arg. but it raises this error :
ValueError: Variable rnn/lstm_cell/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope?
I googled it and I found out that by resetting the model by using this piece of code at the beginning of the block I can solve the error:
tf.reset_default_graph()
but it raises another error:
ValueError: Tensor("lstm/rnn/Const:0", shape=(1,), dtype=int32) must be from the same graph as Tensor("ExpandDims:0", shape=(1,), dtype=int32).
what should I do now? thanks a lot