Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用预训练的词向量 #11

Open
ghost opened this issue Jul 31, 2019 · 1 comment
Open

使用预训练的词向量 #11

ghost opened this issue Jul 31, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 31, 2019

您好,为要使用我们自己预训练的词向量,并且为要确保在文本分类模型的训练过程中,词向量不参与训练。
是否需要修改该选项或其他选项?

@jingjing-gong
Copy link
Member

jingjing-gong commented Jul 31, 2019

pre_trained = True 才行,不跟新参数请改下面代码:

self.embedding = tf.Variable(embed_matrix, 'Embedding')
这行设置一个trainable=False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant