Keras 层
10 个节点
本页内容 10
相加
函数Adds several branches of the same shape, element by element, as a residual connection does.
相加(输入: KerasTensor 数组) -> KerasTensor
KerasTensor Add(KerasTensor[] inputs)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor 数组 | — | The branches. |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
批归一化
函数Rescales its inputs to a steady mean and spread, batch by batch, which makes deeper networks train faster.
批归一化(输入: KerasTensor) -> KerasTensor
KerasTensor BatchNormalization(KerasTensor input)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor | — | The tensor before. |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
拼接
函数Joins several branches side by side, along their last axis.
拼接(输入: KerasTensor 数组) -> KerasTensor
KerasTensor Concatenate(KerasTensor[] inputs)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor 数组 | — | The branches. |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
二维卷积
函数A 2D convolution: small filters slid over a picture-shaped input (height, width, channels), each finding one kind of pattern.
二维卷积 -> KerasTensor
输入: KerasTensor
滤波器数: 整数
卷积核大小: 整数
激活函数: 文本KerasTensor Conv2D(
KerasTensor input,
int filters,
int kernelSize = 3,
string activation = "relu")参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor | — | The tensor before, shaped height, width, channels. |
| 滤波器数 | 整数 | — | How many filters, which is how many channels the output has. |
| 卷积核大小 | 整数 | 3 | Each filter's width and height in pixels. |
| 激活函数 | 文本 | relu | relu, sigmoid...; empty for none. |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
全连接层
函数A fully connected layer: every output is a weighted sum of every input, then the activation.
全连接层 -> KerasTensor
输入: KerasTensor
单元数: 整数
激活函数: 文本KerasTensor Dense(
KerasTensor input,
int units,
string activation)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor | — | The tensor before. |
| 单元数 | 整数 | — | How many outputs. |
| 激活函数 | 文本 | — | relu, sigmoid, softmax, tanh, gelu...; empty for none (a linear output). |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
随机失活
函数Drops a share of its inputs at random while training, against overfitting; does nothing when predicting.
随机失活(输入: KerasTensor, 比率: 数字) -> KerasTensor
KerasTensor Dropout(KerasTensor input, double rate = 0.2)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor | — | The tensor before. |
| 比率 | 数字 | 0.2 | The share dropped, between 0 and 1. |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
展平
函数Lays a shaped input out as one row of numbers, as a Dense layer after convolutions needs.
展平(输入: KerasTensor) -> KerasTensor
KerasTensor Flatten(KerasTensor input)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor | — | The tensor before. |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
输入
函数Where data enters the network: one example's shape, without the batch.
输入(形状: 整数数组, 名称: 文本, 种子: 整数) -> KerasTensor
KerasTensor Input(int[] shape, string name, int seed = -1)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 形状 | 整数数组 | — | The shape of one example, such as 4 for four numbers or 28, 28, 1 for a small grey picture. |
| 名称 | 文本 | — | A name for the input; empty for Keras's own. |
| 种子 | 整数 | -1 | The seed the starting weights of the layers drawn after this input come from, as keras.utils.set_random_seed sets it; negative leaves them random. |
返回
| 张量 | KerasTensor |
备注
Layers draw their starting weights as they are joined to the network, which happens after the Input they hang from, so seeding here makes the whole network's start repeatable.
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
层归一化
函数Rescales each example's features to a steady mean and spread.
层归一化(输入: KerasTensor) -> KerasTensor
KerasTensor LayerNormalization(KerasTensor input)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor | — | The tensor before. |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习
二维最大池化
函数Halves a picture-shaped input's width and height (by default), keeping the strongest value of each patch.
二维最大池化(输入: KerasTensor, 池化大小: 整数) -> KerasTensor
KerasTensor MaxPooling2D(KerasTensor input, int poolSize = 2)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 输入 | KerasTensor | — | The tensor before, shaped height, width, channels. |
| 池化大小 | 整数 | 2 | The patch's width and height. |
返回
| 张量 | KerasTensor |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- Keras 层
- 所属包
- 机器学习