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

Error #4

Open
Astudnew opened this issue Jan 18, 2021 · 0 comments
Open

Error #4

Astudnew opened this issue Jan 18, 2021 · 0 comments

Comments

@Astudnew
Copy link

Hi
I clone your repo on google colab to run it
At the beginning I get an error that torchcrf module not found but after I install pytorch-crf (!pip install pytorch-crf==0.4.0) it works , but I get other errors :
"Traceback (most recent call last):
File "bert_crf.py", line 433, in
t_loss, v_loss = train(train_iter, eval_iter, tag2idx, config=config, bert_model=config.bert_model)
File "bert_crf.py", line 196, in train
model = Bert_CRF.from_pretrained(bert_model, num_labels = len(tag2idx))
File "/usr/local/lib/python3.6/dist-packages/transformers/modeling_utils.py", line 1034, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "bert_crf.py", line 141, in init
self.crf = CRF(self.num_labels, batch_first=True)
TypeError: init() got an unexpected keyword argument 'batch_firs"
how I can fix them?

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

1 participant