Closed nateraw closed 5 years ago
Fixed. If you want to restore a model, pass restore=True
upon initialization of the model and pass the name of the log directory where your model is saved to logdir
too.
ex.
m = model(num_docs, vocab_size, num_topics,
...
restore=True,
logdir="logdir_190313_1905")
When we simplified the model, we deleted some of the variables in
handles
within the model to make the code less confusing. However, after reviewing, we can see that the word embedding variables and the doc mixture variables are not saved + reloaded properly.The main reason for this is because they are stored within the
w_embed
anddoc_mixture
class instances, which are not savable in the config file. So, we need to extract these variables and add them to the config manually to allow for restore to work properly.