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
bert_scorer = BERTScorer(lang='en-sci')
_, _, f1 = bert_scorer.score([pred_text], [r_text])
I get the following error: RuntimeError: The expanded size of the tensor (556) must match the existing size (512) at non-singleton dimension 1. Target sizes: [2, 556]. Tensor sizes: [1, 512]
I get the same error when I use model_type="allenai/scibert_scivocab_uncased". However, when I use lang="en" there are no errors, so it seems to be an issue with scibert specifically.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
I encountered the same issue and found (not ideal but) a quick fix.
You can edit the following line to provide a correct max_length compatible with SciBERT.
At least setting 512 worked for in my case.
Make sure not to set too low so you don't discard your summaries for evaluation too much.
I encountered the same issue and found (not ideal but) a quick fix. You can edit the following line to provide a correct max_length compatible with SciBERT. At least setting 512 worked for in my case. Make sure not to set too low so you don't discard your summaries for evaluation too much.
When I BERTScorer as follows:
I get the following error:
RuntimeError: The expanded size of the tensor (556) must match the existing size (512) at non-singleton dimension 1. Target sizes: [2, 556]. Tensor sizes: [1, 512]
I get the same error when I use
model_type="allenai/scibert_scivocab_uncased"
. However, when I uselang="en"
there are no errors, so it seems to be an issue with scibert specifically.Thanks in advance!
The text was updated successfully, but these errors were encountered: