Skip to content
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

get_encoders() got an unexpected keyword argument 'use_adapter' #54

Open
fb1018 opened this issue Feb 20, 2021 · 3 comments
Open

get_encoders() got an unexpected keyword argument 'use_adapter' #54

fb1018 opened this issue Feb 20, 2021 · 3 comments

Comments

@fb1018
Copy link

fb1018 commented Feb 20, 2021

Traceback (most recent call last):
File "run.py", line 40, in
subject_model, object_model, hbt_model = E2EModel(bert_config_path, bert_checkpoint_path, LR, num_rels)
File "/home/fubo01/work/paper/CasRel/CasRel-master/model.py", line 15, in E2EModel
bert_model = load_trained_model_from_checkpoint(bert_config_path, bert_checkpoint_path, seq_len=None)
File "/home/fubo01/miniconda3/envs/CasRel/lib/python3.7/site-packages/keras_bert/loader.py", line 169, in load_trained_model_from_checkpoint
**kwargs)
File "/home/fubo01/miniconda3/envs/CasRel/lib/python3.7/site-packages/keras_bert/loader.py", line 58, in build_model_from_config
**kwargs)
File "/home/fubo01/miniconda3/envs/CasRel/lib/python3.7/site-packages/keras_bert/bert.py", line 126, in get_model
adapter_activation=gelu,
TypeError: get_encoders() got an unexpected keyword argument 'use_adapter'

@fb1018
Copy link
Author

fb1018 commented Feb 20, 2021

please release your requirements.txt!!!! OK ?

@jiaruncao
Copy link

please release your requirements.txt!!!! OK ?

I solved this problem by installing keras-transformer==0.30.0 via pip.

@GoodDayUp
Copy link

pip install keras_bert==0.81.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants