网页
综合
更新时间 2026-11-15 00:14:31
Embedding layer
自动蜘蛛
keras.io
正文约 838 字
Turns nonnegative integers (indexes) into dense vectors of fixed size.
e.g. [[4], [20]] -> [[0.25, 0.1], [0.6, -0.2]]
This layer can only be used on nonnegative integer inputs of a fixed range.
2D tensor with shape: (batch_size, input_length).
3D tensor with shape: (batch_size, input_length, output_dim).
An embedding layer which can project backwards to the input dim.
This layer is an extension of keras.layers.Embedding for language models. This layer can be called "in reverse" with reverse=True, in which case the layer will linearly project from output_dim back to input_dim.
By default, the reverse projection will use the transpose of the embeddings weights to project to input_dim (weights are "tied"). If tie_weights=False, the model will use a separate, trainable variable for reverse projection.
This layer has no bias terms.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。