aih-uth / joint-entity-and-relation-extraction-from-Japanese-case-report-corpus

0 stars 0 forks source link

RuntimeError: The expanded size of the tensor (1158) must match the existing size (512) at non-singleton dimension 1. Target sizes: [1, 1158]. Tensor sizes: [1, 512]のエラー #2

Closed mumumu09chi closed 1 year ago

mumumu09chi commented 1 year ago

bashを実行するとRuntimeError: The expanded size of the tensor (1158) must match the existing size (512) at non-singleton dimension 1. Target sizes: [1, 1158]. Tensor sizes: [1, 512]でモデルの構築が終了してしまいます。 BERTの入力する単語数には制限があるため最大で510単語として超えるものは除外したとあったのでこのエラーはmecab等の設定で解消されるものでしょうか?現在、mecabのインストールと万病辞書はOSで設定してありますが同じエラーがでます。

daisaku-ss commented 1 year ago

ご報告ありがとうございます。 コードの方を修正しましたので、再ダウンロードして実行していただけますでしょうか。