-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError during the init of pretrained BERT #29
Comments
Clone the older version of code it will be there in releases of texar repo |
So i tried the following:
`!wget https:/asyml/texar/archive/v0.2.0.zip -P texar_repo; !mv texar_repo/texar-0.2.0/* texar_repo` and the installation of the old texar version: the error still occurs |
Please download. 0.1.0 |
Hello thank you for your reply. Thank you for your help! Off-Topic: Do you have any good ressources to learn tensorflow or did you just read the tensorflow documentation? |
Hello!
I tried your code in a google colab and i encountered a problem i wasn't able to solve.
During the inititalization of the Bert encoder in your ipynb:
https:/santhoshkolloju/Abstractive-Summarization-With-Transfer-Learning/blob/master/BERT_SUMM.ipynb
in cell 15 there occurs the following error
`Intializing the Bert Encoder Graph
loading the bert pretrained weights
ValueError Traceback (most recent call last)
in ()
35 init_checkpoint = os.path.join(bert_pretrain_dir, 'bert_model.ckpt')
36 #init_checkpoint = "gs://cloud-tpu-checkpoints/bert/uncased_L-12_H-768_A-12/bert_model.ckpt"
---> 37 model_utils.init_bert_checkpoint(init_checkpoint)
5 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/checkpoint_utils.py in _init_from_checkpoint(ckpt_dir_or_file, assignment_map)
344 "Assignment map with scope only name {} should map to scope only "
345 "{}. Should be 'scope/': 'other_scope/'.".format(
--> 346 scopes, tensor_name_in_ckpt))
347 # If scope to scope mapping was provided, find all variables in the scope
348 # and create variable to variable mapping.
ValueError: Assignment map with scope only name bert/position_embeddings should map to scope only bert/embeddings/position_embeddings. Should be 'scope/': 'other_scope/'.`
i checked the github repo of texar already and found the post:
asyml/texar#127
Basically the code for the encoder and decoder changed in the newer version of texar but i dont know how to adjust the code.
The text was updated successfully, but these errors were encountered: