0

我正在使用 kaggle 上的 sentence_transformers 库中的 DistilBERT,但是当我导入我的模型并尝试用它编码一个句子时:

modelB = SentenceTransformer('../input/sentence-transformer-models/stsb-distillbert-base')

a = ['This framework generates embeddings for each input sentence',
    'Sentences are passed as a list of string.',
    'The quick brown fox jumps over the lazy dog.']

modelB.encode(a)

我收到以下错误:

IndexError:维度超出范围(预计在 [-1, 0] 范围内,但得到 1)

4

0 回答 0