TypeError: get_encoders() got an unexpected keyword argument 'use_adapter'
See original GitHub issueimport os
from keras_bert import load_trained_model_from_checkpoint
layer_num = 12
checkpoint_path = 'rubert_cased_L-12_H-768_A-12_v1'
config_path = os.path.join(checkpoint_path, 'bert_config.json')
model_path = os.path.join(checkpoint_path, 'bert_model.ckpt')
model = load_trained_model_from_checkpoint(
config_path,
model_path,
training=False,
use_adapter=True,
trainable=['Encoder-{}-MultiHeadSelfAttention-Adapter'.format(i + 1) for i in range(layer_num)] +
['Encoder-{}-FeedForward-Adapter'.format(i + 1) for i in range(layer_num)] +
['Encoder-{}-MultiHeadSelfAttention-Norm'.format(i + 1) for i in range(layer_num)] +
['Encoder-{}-FeedForward-Norm'.format(i + 1) for i in range(layer_num)],
)
I try to run this code from tutorial and this error arises:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-23-a18dfbad0880> in <module>
15 ['Encoder-{}-FeedForward-Adapter'.format(i + 1) for i in range(layer_num)] +
16 ['Encoder-{}-MultiHeadSelfAttention-Norm'.format(i + 1) for i in range(layer_num)] +
---> 17 ['Encoder-{}-FeedForward-Norm'.format(i + 1) for i in range(layer_num)],
18 )
TypeError: load_trained_model_from_checkpoint() got an unexpected keyword argument 'use_adapter'
By the way, i tried to upgrade keras-transformers - it didnt help
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
python - TypeError: __init__() got an unexpected keyword ...
Here's the complete code that I was able to run on sklearn == 0.23.1 import pandas as pd from sklearn.compose import ColumnTransformer from ......
Read more >Unexpected keyword argument - Anvil Q&A
TypeError : notify_burned() got an unexpected keyword argument 'customer_name' at /downlink/anvil/_server.py, line 1340.
Read more >TypeError: __init__() got an unexpected keyword argument ...
Hi, I have followed the steps given in the chapter to set up mflix app. ... TypeError: init() got an unexpected keyword argument...
Read more >TypeError: invoke() got an unexpected keyword argument ...
TypeError : invoke() got an unexpected keyword argument when using Verb on Orion.Accounts API ... Hi,. I am using Python and looking to...
Read more >Error "get_file_data() got an unexpected keyword argument ...
I have configured one input using the File-Meta Data input to monitor a log file. ... TypeError: get_file_data() got an unexpected keyword argument...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try
pip install keras-transformer==0.33.0