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