- Keras 教程
- Keras - 主页
- Keras - 简介
- Keras - 安装
- Keras - 后端配置
- Keras - 深度学习概述
- Keras - 深度学习
- Keras - 模块
- Keras - 层
- Keras - 自定义层
- Keras - 模型
- Keras - 模型编译
- Keras - 模型评估和预测
- Keras - 卷积神经网络
- Keras - 使用 MPL 进行回归预测
- Keras - 使用 LSTM RNN 进行时间序列预测
- Keras - 应用程序
- Keras - 使用 ResNet 模型进行实时预测
- Keras - 预训练模型
- Keras 有用资源
- Keras - 快速指南
- Keras - 有用资源
- Keras - 讨论
Keras - 嵌入层
它在输入层执行嵌入运算。用于将正数转换成固定大小的稠密向量。其主要应用是文本分析。Embedding 层 函数及其具有默认值的参数签名如下所示:
keras.layers.Embedding ( input_dim, output_dim, embeddings_initializer = 'uniform', embeddings_regularizer = None, activity_regularizer = None, embeddings_constraint = None, mask_zero = False, input_length = None )
此处:
input_dim 指输入维数。
output_dim 指稠密嵌入维数。
embeddings_initializer 指嵌入矩阵的初始化器
embeddings_regularizer 指应用于嵌入矩阵的正则化函数。
activity_regularizer 指应用于层输出的正则化函数。
embeddings_constraint 指应用于嵌入矩阵的约束函数
mask_zero 指输入值是否应进行掩盖。
input_length 指输入序列的长度。
广告