lavis-nlp / spert

PyTorch code for SpERT: Span-based Entity and Relation Transformer
MIT License
691 stars 148 forks source link

Runtime Error #60

Closed CamiloContrerasPhD closed 3 years ago

CamiloContrerasPhD commented 3 years ago

Hello Mark, thanks for sharing the model and the exciting paper. After training and evaluating with the CoNLL04 example, I have been trying with some paper's data. The problem is that with this new data, a RuntimeError appeared: The expanded size of the tensor (566) must match the existing size (512) at non-singleton dimension 1. Target sizes: [1, 566]. Tensor sizes: [1, 512]

Have you any aidea of this error please ? Thanks in advance.

CamiloContrerasPhD commented 3 years ago

Fixed, the problem its because BERT consumes 512 tokens max.