"...text-generation-inference.git" did not exist on "470046519277e9543d9a6d8f102324ff8b44c7db"
Commit 9d53a513 authored by Rahul Nimbal's avatar Rahul Nimbal Committed by Andrew M Dai
Browse files

Update readme.md to fix the issue #7040. (#7154)



* Update research/maskgan/README.md
Co-Authored-By: default avatarAndrew M Dai <andy.dai@gmail.com>
parent 2ed43e66
...@@ -19,7 +19,7 @@ Copy PTB data downloaded from the above tensorflow RNN tutorial to folder "/tmp/ ...@@ -19,7 +19,7 @@ Copy PTB data downloaded from the above tensorflow RNN tutorial to folder "/tmp/
Make folder /tmp/pretrain-lm and copy checkpoints from above Tensorflow RNN tutorial under this folder. Make folder /tmp/pretrain-lm and copy checkpoints from above Tensorflow RNN tutorial under this folder.
2. Run MaskGAN in MLE pretraining mode. If step 1 was not run, set 2. Run MaskGAN in MLE pretraining mode. If step 1 was not run*, set
`language_model_ckpt_dir` to empty. `language_model_ckpt_dir` to empty.
```bash ```bash
...@@ -87,6 +87,20 @@ python generate_samples.py \ ...@@ -87,6 +87,20 @@ python generate_samples.py \
--number_epochs=4 --number_epochs=4
``` ```
* While trying to run Step 2, the following error appears:
NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Key critic/rnn/biases not found in checkpoint
[[node save/RestoreV2 (defined at train_mask_gan.py:431) ]]
This is an issue with seq2seq model because it uses the attention mechanism.
The issue arises if you saved the model with an earlier version (seq2seq is old) and restore with a recent one (saver.restore got updated).
The naming convention for LSTM parameters changed, e.g. cell_0/basic_lstm_cell/weights became cell_0/basic_lstm_cell/kernel.
Which is why you cannot restore them if you try to restore old checkpoints with recent TF.
The below script will help rename the variables and everything will work as expected.
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/tools/checkpoint_convert.py
## Contact for Issues ## Contact for Issues
* Liam Fedus, @liamb315 <liam.fedus@gmail.com> * Liam Fedus, @liamb315 <liam.fedus@gmail.com>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment