cjymz886 / text-cnn

嵌入Word2vec词向量的CNN中文文本分类

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

训练的时候使用的词向量是否没用到Word2Vec向量?

Minjuner-97 opened this issue · comments

commented

在text_train.py文件中:

x_train, y_train = process_file(config.train_filename, word_to_id, cat_to_id, config.seq_length)
x_val, y_val = process_file(config.val_filename, word_to_id, cat_to_id, config.seq_length)

训练数据使用的是:process_file方法,训练集x使用的是 word_to_id:get from def read_vocab(),是根据生成词表的位置索引。

请问如何使用训练好的Word2Vec向量?