Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

python - torchtext如何汇总每个文档的单词向量?(How torchtext aggregates word vectors for each document?)

I am new to torchtext and I know that we can use pre-trained word embeddings for documents using the following code:

(我是torchtext的新手,我知道我们可以使用以下代码对文档进行预训练的单词嵌入:)

text_field.build_vocab(train_data, vectors="glove.6B.100d")

where text_field is a torchtext.data.Field object.

(其中text_field是torchtext.data.Field对象。)

Now my question is that how torchtext aggregates individual word vectors for a document?

(现在我的问题是,torchtext如何聚合文档的各个单词向量?)

Is it using a simple averaging over vectors or something more advanced like LSTM?

(它是使用矢量的简单平均还是更高级的LSTM?)

  ask by sisaman translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...