Tensorflow Embeddings Don't Exist After First Rnn Example
I've setup a print statement and I've noticed that for the first batch when feeding an RNN, the embeddings exist, but after the second batch they don't and I get the following erro
Solution 1:
Seems that the code is trying to create a new Adam Variable in each batch.
Possible that the add_training_op
is called twice?
Also, the snippet of def add_training_op
is incomplete since there is no return statement.
Solution 2:
The problem turned out to be the following line of code:
model = RNNLM_Model(config)
# This instructs gen_model to reuse the same variables as the model above
scope.reuse_variables()
gen_model = RNNLM_Model(gen_config)
It turns out that the second model was an issue by using reuse_variables()
. By removing this line by issues went away.
Post a Comment for "Tensorflow Embeddings Don't Exist After First Rnn Example"