def sparse_from_word_vec(word_vec):
num_words = len(word_vec)
indices = [[xi, 0, yi] for xi,x in enumerate(word_vec) for yi,y in enumerate(x)]
chars = list(''.join(word_vec))
return(tf.SparseTensorValue(indices, chars, [num_words,1,1]))
# Loop through test indices
address_matching.py 文件源码
python
阅读 37
收藏 0
点赞 0
评论 0
评论列表
文章目录