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 |
---|---|
创建深度学习网络以进行图像分类或回归。 | |
Create deep learning networks for sequence and time series data. | |
Create deep learning network for audio data. | Speech Command Recognition Using Deep Learning |
为文本数据创建深度学习网络。 |
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 |
---|---|
An image input layer inputs 2-D images to a network and applies data normalization. | |
3-D图像输入层输入3-D图像或卷到网络并应用数据归一化。 | |
序列输入层将序列数据输入到网络。 | |
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). | |
|
ROI输入层将图像输入到快速的R-CNN对象检测网络。 |
层 | Description |
---|---|
A 2-D convolutional layer applies sliding convolutional filters to the input. | |
A 3-D convolutional layer applies sliding cuboidal convolution filters to three-dimensional input. | |
2D分组的卷积层将输入通道分为组,并应用滑动卷积过滤器。使用分组的卷积层进行通道可分离(也称为深度可分离)卷积。 | |
A transposed 2-D convolution layer upsamples feature maps. | |
A transposed 3-D convolution layer upsamples three-dimensional feature maps. | |
完全连接的层将输入乘以重量矩阵,然后添加偏置向量。 |
层 | Description |
---|---|
序列输入层将序列数据输入到网络。 | |
An LSTM layer learns long-term dependencies between time steps in time series and sequence data. | |
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. | |
A GRU layer learns dependencies between time steps in time series and sequence data. | |
序列折叠层将一批图像序列转换为一批图像。使用序列折叠层在图像序列的时间步长上执行卷积操作。 | |
序列展开层在序列折叠后恢复输入数据的序列结构。 | |
一个平坦的层使输入的空间尺寸折叠到通道尺寸中。 | |
|
一个单词嵌入图层将单词索引映射到向量。 |
层 | Description |
---|---|
A ReLU layer performs a threshold operation to each element of the input, where any value less than zero is set to zero. | |
A leaky ReLU layer performs a threshold operation, where any input value less than zero is multiplied by a fixed scalar. | |
剪切的relu层执行阈值操作,其中任何小于零的输入值都设置为零,并且上方的任何值clipping ceilingis set to that clipping ceiling. | |
An ELU activation layer performs the identity operation on positive inputs and an exponential nonlinearity on negative inputs. | |
A hyperbolic tangent (tanh) activation layer applies the tanh function on the layer inputs. | |
|
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. |
层 | Description |
---|---|
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. | |
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. | |
A channel-wise local response (cross-channel) normalization layer carries out channel-wise normalization. | |
A dropout layer randomly sets input elements to zero with a given probability. | |
2-D农作物层适用于输入。 | |
A 3-D crop layer crops a 3-D volume to the size of the input feature map. | |
|
2D调整层通过比例因子或指定的高度和宽度大小的2D输入大小。 |
|
A 3-D resize layer resizes 3-D input by a scale factor or to a specified height, width, and depth. |
层 | Description |
---|---|
An average pooling layer performs down-sampling by dividing the input into rectangular pooling regions and computing the average values of each region. | |
三维平均池层性能或者ms down-sampling by dividing three-dimensional input into cuboidal pooling regions and computing the average values of each region. | |
A global average pooling layer performs down-sampling by computing the mean of the height and width dimensions of the input. | |
A 3-D global average pooling layer performs down-sampling by computing the mean of the height, width, and depth dimensions of the input. | |
A max pooling layer performs down-sampling by dividing the input into rectangular pooling regions, and computing the maximum of each region. | |
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. | |
通过计算输入的高度和宽度维度的最大值,全局最大池层执行下采样。 | |
A 3-D global max pooling layer performs down-sampling by computing the maximum of the height, width, and depth dimensions of the input. | |
最大不化层不致密最大池层的输出。 |
层 | Description |
---|---|
An addition layer adds inputs from multiple neural network layers element-wise. | |
A multiplication layer multiplies inputs from multiple neural network layers element-wise. | |
深度串联层采用具有相同高度和宽度的输入,并沿第三维(通道维度)连接它们。 | |
串联层采用输入并沿指定的维度串联。除串联维度外,输入必须在所有维度上具有相同的大小。 | |
|
A weighted addition layer scales and adds inputs from multiple neural network layers element-wise. |
层 | Description |
---|---|
|
ROI输入层将图像输入到快速的R-CNN对象检测网络。 |
|
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. |
|
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. |
|
An anchor box layer stores anchor boxes for a feature map used in object detection networks. |
|
区域提案层将围绕图像中潜在对象的边界框输出,作为更快的R-CNN中区域建议网络(RPN)的一部分。 |
|
SSD合并层合并特征图的输出,以进行后续回归和分类损失计算。 |
|
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. |
|
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. |
|
焦点损耗层使用焦点损失预测对象类。 |
|
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. |
|
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 |
---|---|
|
一个项目和重塑层作为输入1 x-1 by-的输入numLatentInputs arrays and converts them to images of the specified size. Use project and reshape layers to reshape the noise input to GANs. |
|
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. |
层 | Description |
---|---|
A softmax layer applies a softmax function to the input. | |
A sigmoid layer applies a sigmoid function to the input such that the output is bounded in the interval (0,1). | |
A classification layer computes the cross entropy loss for multi-class classification problems with mutually exclusive classes. | |
回归层为回归问题计算半均值的误差损失。 | |
|
像素分类层为每个图像像素或体素提供了一个分类标签。 |
|
骰子像素分类层使用广义骰子丢失为每个图像像素或体素提供一个分类标签。 |
|
焦点损耗层使用焦点损失预测对象类。 |
|
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. |
|
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. |
|
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. |
|
加权分类层计算分类问题的加权交叉熵损失。 |
|
A Tversky pixel classification layer provides a categorical label for each image pixel or voxel using Tversky loss. |
|
分类SSE层计算分类问题的正方形误差损失之和。 |
|
A regression MAE layer computes the mean absolute error loss for regression problems. |