tfRNN.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:SNLI-Keras 作者: adamzjk 项目源码 文件源码
def prep_embd(self):
    # Add a Embed Layer to convert word index to vector
    if not os.path.exists('GloVe_' + self.dataset + '.npy'):
      self.load_GloVe()
    embed_matrix = np.load('GloVe_' + self.dataset + '.npy')
    self.Embed = Embedding(input_dim = self.Vocab,
                           output_dim = self.EmbeddingSize,
                           input_length = self.SentMaxLen,
                           trainable = False,
                           weights = [embed_matrix],
                           name = 'embed_snli')

  # TODO Decomposable Attention Model by Ankur P. Parikh et al. 2016
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号