主要内容

List of Deep Learning Layers

This page provides a list of deep learning layers in MATLAB®.

To learn how to create networks from layers for different tasks, see the following examples.

任务 Learn More
创建深度学习网络以进行图像分类或回归。

创建简单的深Learning Network for Classification

火车卷积神经网络回归

火车残留网络进行图像分类

Create deep learning networks for sequence and time series data.

Sequence Classification Using Deep Learning

时间序列预测使用深度学习

Create deep learning network for audio data. Speech Command Recognition Using Deep Learning
为文本数据创建深度学习网络。

Classify Text Data Using Deep Learning

Generate Text Using Deep Learning

Deep Learning Layers

Use the following functions to create different layer types. Alternatively, use the深网设计师app to create networks interactively.

To learn how to define your own custom layers, seeDefine Custom Deep Learning Layers.

输入层

Description

imageInputLayer

An image input layer inputs 2-D images to a network and applies data normalization.

image3dInputLayer

3-D图像输入层输入3-D图像或卷到网络并应用数据归一化。

sequenceInputLayer

序列输入层将序列数据输入到网络。

featureinputlayer

A feature input layer inputs feature data into a network and applies data normalization. Use this layer when you have a data set of numeric scalars representing features (data without spatial or time dimensions).

roiInputLayer(Computer Vision Toolbox)

ROI输入层将图像输入到快速的R-CNN对象检测网络。

卷积和完全连接的层

Description

卷积2Dlayer

A 2-D convolutional layer applies sliding convolutional filters to the input.

convolution3dLayer

A 3-D convolutional layer applies sliding cuboidal convolution filters to three-dimensional input.

groupedConvolution2dLayer

2D分组的卷积层将输入通道分为组,并应用滑动卷积过滤器。使用分组的卷积层进行通道可分离(也称为深度可分离)卷积。

transposedconv2dlayer

A transposed 2-D convolution layer upsamples feature maps.

transposedConv3dLayer

A transposed 3-D convolution layer upsamples three-dimensional feature maps.

fullyConnectedLayer

完全连接的层将输入乘以重量矩阵,然后添加偏置向量。

Sequence Layers

Description

sequenceInputLayer

序列输入层将序列数据输入到网络。

lstmLayer

An LSTM layer learns long-term dependencies between time steps in time series and sequence data.

Bilstmlayer

A bidirectional LSTM (BiLSTM) layer learns bidirectional long-term dependencies between time steps of time series or sequence data. These dependencies can be useful when you want the network to learn from the complete time series at each time step.

gruLayer

A GRU layer learns dependencies between time steps in time series and sequence data.

sequenceFoldingLayer

序列折叠层将一批图像序列转换为一批图像。使用序列折叠层在图像序列的时间步长上执行卷积操作。

sequenceUnfoldingLayer

序列展开层在序列折叠后恢复输入数据的序列结构。

flattenLayer

一个平坦的层使输入的空间尺寸折叠到通道尺寸中。

wordEmbeddingLayer(文本分析工具箱)

一个单词嵌入图层将单词索引映射到向量。

激活层

Description

reluLayer

A ReLU layer performs a threshold operation to each element of the input, where any value less than zero is set to zero.

leakyReluLayer

A leaky ReLU layer performs a threshold operation, where any input value less than zero is multiplied by a fixed scalar.

clippedReluLayer

剪切的relu层执行阈值操作,其中任何小于零的输入值都设置为零,并且上方的任何值clipping ceilingis set to that clipping ceiling.

Elulayer

An ELU activation layer performs the identity operation on positive inputs and an exponential nonlinearity on negative inputs.

tanhLayer

A hyperbolic tangent (tanh) activation layer applies the tanh function on the layer inputs.

preluLayer(自定义层示例)

A PReLU layer performs a threshold operation, where for each channel, any input value less than zero is multiplied by a scalar learned at training time.

Normalization, Dropout, and Cropping Layers

Description

batchNormalizationLayer

A batch normalization layer normalizes each input channel across a mini-batch. To speed up training of convolutional neural networks and reduce the sensitivity to network initialization, use batch normalization layers between convolutional layers and nonlinearities, such as ReLU layers.

groupNormalizationLayer

A group normalization layer divides the channels of the input data into groups and normalizes the activations across each group. To speed up training of convolutional neural networks and reduce the sensitivity to network initialization, use group normalization layers between convolutional layers and nonlinearities, such as ReLU layers. You can perform instance normalization and layer normalization by setting the appropriate number of groups.

crossChannelNormalizationLayer

A channel-wise local response (cross-channel) normalization layer carries out channel-wise normalization.

dropoutlayer

A dropout layer randomly sets input elements to zero with a given probability.

crop2dLayer

2-D农作物层适用于输入。

crop3dLayer

A 3-D crop layer crops a 3-D volume to the size of the input feature map.

resize2dLayer(图像处理工具箱)

2D调整层通过比例因子或指定的高度和宽度大小的2D输入大小。

resize3dlayer(图像处理工具箱)

A 3-D resize layer resizes 3-D input by a scale factor or to a specified height, width, and depth.

Pooling and Unpooling Layers

Description

平均泵2Dlayer

An average pooling layer performs down-sampling by dividing the input into rectangular pooling regions and computing the average values of each region.

averagePooling3dLayer

三维平均池层性能或者ms down-sampling by dividing three-dimensional input into cuboidal pooling regions and computing the average values of each region.

globalAveragePooling2dLayer

A global average pooling layer performs down-sampling by computing the mean of the height and width dimensions of the input.

globalAveragePooling3dLayer

A 3-D global average pooling layer performs down-sampling by computing the mean of the height, width, and depth dimensions of the input.

maxPooling2dLayer

A max pooling layer performs down-sampling by dividing the input into rectangular pooling regions, and computing the maximum of each region.

maxPooling3dLayer

A 3-D max pooling layer performs down-sampling by dividing three-dimensional input into cuboidal pooling regions, and computing the maximum of each region.

GlobalMaxPooling2Dlayer

通过计算输入的高度和宽度维度的最大值,全局最大池层执行下采样。

GlobalMaxPooling3Dlayer

A 3-D global max pooling layer performs down-sampling by computing the maximum of the height, width, and depth dimensions of the input.

maxUnpooling2dLayer

最大不化层不致密最大池层的输出。

Combination Layers

Description

加法器

An addition layer adds inputs from multiple neural network layers element-wise.

multiplicationLayer

A multiplication layer multiplies inputs from multiple neural network layers element-wise.

depthConcatenationLayer

深度串联层采用具有相同高度和宽度的输入,并沿第三维(通道维度)连接它们。

联合层

串联层采用输入并沿指定的维度串联。除串联维度外,输入必须在所有维度上具有相同的大小。

weightedAdditionLayer(自定义层示例)

A weighted addition layer scales and adds inputs from multiple neural network layers element-wise.

对象检测层

Description

roiInputLayer(Computer Vision Toolbox)

ROI输入层将图像输入到快速的R-CNN对象检测网络。

roimaxpooling2dlayer(Computer Vision Toolbox)

An ROI max pooling layer outputs fixed size feature maps for every rectangular ROI within the input feature map. Use this layer to create a Fast or Faster R-CNN object detection network.

Roialignlayer(Computer Vision Toolbox)

An ROI align layer outputs fixed size feature maps for every rectangular ROI within an input feature map. Use this layer to create a Mask-RCNN network.

AnchorBoxLayer(Computer Vision Toolbox)

An anchor box layer stores anchor boxes for a feature map used in object detection networks.

ZeareProposAllayer(Computer Vision Toolbox)

区域提案层将围绕图像中潜在对象的边界框输出,作为更快的R-CNN中区域建议网络(RPN)的一部分。

ssdMergeLayer(Computer Vision Toolbox)

SSD合并层合并特征图的输出,以进行后续回归和分类损失计算。

spaceToDepthLayer(Computer Vision Toolbox)

A space to depth layer permutes the spatial blocks of the input into the depth dimension. Use this layer when you need to combine feature maps of different size without discarding any feature data.

rpnSoftmaxLayer(Computer Vision Toolbox)

A region proposal network (RPN) softmax layer applies a softmax activation function to the input. Use this layer to create a Faster R-CNN object detection network.

focalLossLayer(Computer Vision Toolbox)

焦点损耗层使用焦点损失预测对象类。

rpnClassificationLayer(Computer Vision Toolbox)

A region proposal network (RPN) classification layer classifies image regions as eitherobject或者背景by using a cross entropy loss function. Use this layer to create a Faster R-CNN object detection network.

rcnnBoxRegressionLayer(Computer Vision Toolbox)

A box regression layer refines bounding box locations by using a smooth L1 loss function. Use this layer to create a Fast or Faster R-CNN object detection network.

生成对抗网络层

Description

ProjectAndReshapelayer(自定义层示例)

一个项目和重塑层作为输入1 x-1 by-的输入numLatentInputsarrays and converts them to images of the specified size. Use project and reshape layers to reshape the noise input to GANs.

embedAndReshapeLayer(自定义层示例)

An embed and reshape layer takes as input numeric indices of categorical elements and converts them to images of the specified size. Use embed and reshape layers to input categorical data into conditional GANs.

Output Layers

Description

softmaxLayer

A softmax layer applies a softmax function to the input.

sigmoidLayer

A sigmoid layer applies a sigmoid function to the input such that the output is bounded in the interval (0,1).

classificationLayer

A classification layer computes the cross entropy loss for multi-class classification problems with mutually exclusive classes.

regressionLayer

回归层为回归问题计算半均值的误差损失。

pixelClassificationLayer(Computer Vision Toolbox)

像素分类层为每个图像像素或体素提供了一个分类标签。

dicePixelClassificationLayer(Computer Vision Toolbox)

骰子像素分类层使用广义骰子丢失为每个图像像素或体素提供一个分类标签。

focalLossLayer(Computer Vision Toolbox)

焦点损耗层使用焦点损失预测对象类。

rpnSoftmaxLayer(Computer Vision Toolbox)

A region proposal network (RPN) softmax layer applies a softmax activation function to the input. Use this layer to create a Faster R-CNN object detection network.

rpnClassificationLayer(Computer Vision Toolbox)

A region proposal network (RPN) classification layer classifies image regions as eitherobject或者背景by using a cross entropy loss function. Use this layer to create a Faster R-CNN object detection network.

rcnnBoxRegressionLayer(Computer Vision Toolbox)

A box regression layer refines bounding box locations by using a smooth L1 loss function. Use this layer to create a Fast or Faster R-CNN object detection network.

weightedClassificationLayer(自定义层示例)

加权分类层计算分类问题的加权交叉熵损失。

tverskypixelClassificationlayer(自定义层示例)

A Tversky pixel classification layer provides a categorical label for each image pixel or voxel using Tversky loss.

sseClassificationLayer(自定义层示例)

分类SSE层计算分类问题的正方形误差损失之和。

maeRegressionLayer(自定义层示例)

A regression MAE layer computes the mean absolute error loss for regression problems.

See Also

||

相关话题