You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: