本文介绍了训练CNN时如何对输入word2vec进行微调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我阅读卷积神经网络用于句子分类"(Yoon Kim-纽约大学)时,我注意到该论文实现了"CNN-非静态"模型-该模型具有来自word2vec的预训练向量,所有单词(包括随机初始化的未知单词),以及针对每个任务的预训练矢量都将进行微调.因此,我只是不了解如何针对每个任务微调预训练向量.据我所知,输入向量是通过word2vec.bin(预训练)从字符串转换而来的,就像图像矩阵一样,在训练CNN时不会改变.那么,如果可以,怎么办?请帮帮我,非常感谢!

When I read the paper "Convolutional Neural Networks for Sentence Classification"-Yoon Kim-New York University, I noticed that the paper implemented the "CNN-non-static" model--A model with pre-trained vectors from word2vec,and all words— including the unknown ones that are randomly initialized, and the pre-trained vectors are fine-tuned for each task.So I just do not understand how the pre-trained vectors are fine-tuned for each task. Cause as far as I know, the input vectors, which are converted from strings by word2vec.bin(pre-trained), just like image matrix, which can not change during training CNN. So, if they can, HOW? Please help me out, Thanks a lot in advance!

推荐答案

词嵌入是神经网络的权重,因此可以在反向传播期间进行更新.

The word embeddings are weights of the neural network, and can therefore be updated during backpropagation.

例如 http://sebastianruder.com/word-embeddings-1/:

这篇关于训练CNN时如何对输入word2vec进行微调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 03:33