原书出处
深入浅出Embedding:原理解析与应用实践 (吴茂贵, 王红星)
02 第2章 获取Embedding的方法
x_words, embedding_dim)) for word, i in word_index.items():
embedding_vector = embeddings_index.get(word) if i < max_words: if embedding_vector is not None: # 在嵌入索引(embedding index)找不到的词,其嵌入向量都设为0 embedding_matrix[i] = embedding_vector
2.3.5 构建模型 采用Keras的序列(Sequential)构建模型,代码如下: from tensorflow
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/深入浅出Embedding:原理解析与应用实践 (吴茂贵, 王红星)/_epub-src/OEBPS/Text/Chapter5_0003.xhtml
EPUB SHA-256:0056cad2f11cb1d60ead5054060bd6d41fef87dd049656db310bdc789c0ec7da