Main Content

TransposedConvolution3dLayer

Transposed 3-D convolution layer

Description

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

该层有时被错误地称为“反卷积”或“ deconv”层。该层是卷积的转置,不执行反卷积。

创建

Create a transposed convolution 3-D layer using转置Conv3dLayer

特性

expand all

转置卷积

过滤器的高度,宽度和深度,指定为矢量[h w d]在三个积极整数中h是高度,w是宽度,d是深度。过滤定义神经元在输入中连接的局部区域的大小。

When creating the layer, you can specify过滤as a scalar to use the same value for the height, width, and depth.

Example:[5 5 5]指定高度,宽度和深度为5的过滤器。

This property is read-only.

Number of filters, specified as a positive integer. This number corresponds to the number of neurons in the layer that connect to the same region in the input. This parameter determines the number of channels (feature maps) in the layer output.

Data Types:单身的|double|int8|int16|int32|int64|UINT8|uint16|UINT32|Uint64

用于遍历三维输入的步长,指定为向量[a b c]在三个积极整数中ais the vertical step size,bis the horizontal step size, andcis the step size along the depth. When creating the layer, you can specify大步作为标量,可以在所有三个方向上使用相同的阶跃大小。

Example:[2 3 1]指定垂直步长为2,水平步长为3,沿1的深度为步长。

Data Types:单身的|double|int8|int16|int32|int64|UINT8|uint16|UINT32|Uint64

Method to determine cropping size, specified as'手动的'或者'相同的'

该软件会自动设置裁切模式based on the'Cropping'value you specify when creating the layer.

  • 如果您设置种植数值值的选项,然后软件自动设置裁切模式property of the layer to'手动的'

  • 如果您设置'Cropping'option to'相同的',然后software automatically sets the裁切模式property of the layer to'相同的'并设置裁剪以使输出尺寸等于inputSize .* Stride, whereinputSize是层输入的高度,宽度和深度。

To specify the cropping size, use the'Cropping'option of转置Conv3dLayer

Output size reduction, specified as a matrix of nonnegative integers[t l f; b r bk],t,l,f,b,r,bkare the amounts to crop from the top, left, front, bottom, right, and back of the input, respectively.

To specify the cropping size manually, use the'Cropping'option oftransposedconv2dlayer

Example:[0 1 0 1 0 1]

This property is read-only.

Number of input channels, specified as one of the following:

  • 'auto'— Automatically determine the number of input channels at training time.

  • Positive integer — Configure the layer for the specified number of input channels.NumChannels和the number of channels in the layer input data must match. For example, if the input is an RGB image, thenNumChannelsmust be 3. If the input is the output of a convolutional layer with 16 filters, thenNumChannels必须是16。

Data Types:单身的|double|int8|int16|int32|int64|UINT8|uint16|UINT32|Uint64|char|细绳

Parameters and Initialization

Function to initialize the weights, specified as one of the following:

  • 'glorot'– Initialize the weights with the Glorot initializer[1](also known as Xavier initializer). The Glorot initializer independently samples from a uniform distribution with zero mean and variance2/(numIn + numOut), wherenumIn = FilterSize(1)*FilterSize(2)*FilterSize(3)*NumChannelsnumOut = filtersize(1)*filtersize(2)*filtersize(3)*numfilters

  • 'he'– Initialize the weights with the He initializer[2]。来自均值和方差的正态分布的HE初始化样品样本2/numIn, wherenumIn = FilterSize(1)*FilterSize(2)*FilterSize(3)*NumChannels

  • “窄正常”– Initialize the weights by independently sampling from a normal distribution with zero mean and standard deviation 0.01.

  • 'zeros'– Initialize the weights with zeros.

  • 'ones'– Initialize the weights with ones.

  • 功能处理 - 使用自定义功能初始化权重。如果指定函数句柄,则该函数必须是表单的weights = func(sz), whereSZis the size of the weights. For an example, see指定自定义重量初始化功能

该层仅在Weightsproperty is empty.

Data Types:char|细绳|function_handle

Function to initialize the bias, specified as one of the following:

  • 'zeros'- 初始化零的偏差。

  • 'ones'- 用一个初始化偏见。

  • “窄正常”- 通过从平均值为零和标准偏差为0.01的正态分布中独立采样来初始化偏差。

  • Function handle — Initialize the bias with a custom function. If you specify a function handle, then the function must be of the form偏见= func(sz), whereSZ是偏见的大小。

The layer only initializes the bias when the偏见property is empty.

Data Types:char|细绳|function_handle

层weights for the transposed convolutional layer, specified as a numeric array.

层权重是可学习的参数。您可以使用该权重指定权重的初始值Weights层的属性。When you train a network, if theWeights该层的属性是非空的,然后trainNetwork使用Weights属性作为初始值。如果theWeightsproperty is empty, thentrainNetwork使用由WeightsInitializer层的属性。

At training time,Weights是一个过滤(1)-by-过滤(2)-by-过滤(3)-by-数字-by-NumChannelsarray.

Data Types:单身的|double

层的层偏置,用于指定为数字阵列的转置卷积层。

The layer biases are learnable parameters. When you train a network, if偏见那是非空的trainNetwork使用偏见属性作为初始值。如果偏见is empty, thentrainNetwork使用由双重化器

At training time,偏见是一个1-by-1-by-1-by-数字array.

Data Types:单身的|double

Learning Rate and Regularization

权重的学习率因子,指定为非负标量。

该软件将该因素乘以全局learning rate to determine the learning rate for the weights in this layer. For example, if重量应培训is2,然后learning rate for the weights in this layer is twice the current global learning rate. The software determines the global learning rate based on the settings you specify using the训练function.

Data Types:单身的|double|int8|int16|int32|int64|UINT8|uint16|UINT32|Uint64

Learning rate factor for the biases, specified as a nonnegative scalar.

该软件将该因素乘以全球学习率,以确定该层中偏见的学习率。例如,如果偏见LearnRateFactoris2的学习速率,然后biases in the layer is twice the current global learning rate. The software determines the global learning rate based on the settings you specify using the训练function.

Data Types:单身的|double|int8|int16|int32|int64|UINT8|uint16|UINT32|Uint64

L2权重的正则化因子,指定为非负标量。

该软件将该因素乘以全局L2regularization factor to determine theL2regularization for the weights in this layer. For example, if举重2因子is2,然后L2regularization for the weights in this layer is twice the globalL2regularization factor. You can specify the globalL2使用的正规化因子使用训练function.

Data Types:单身的|double|int8|int16|int32|int64|UINT8|uint16|UINT32|Uint64

L2regularization factor for the biases, specified as a nonnegative scalar.

该软件将该因素乘以全局L2regularization factor to determine theL2regularization for the biases in this layer. For example, if偏见L2Factoris2,然后L2regularization for the biases in this layer is twice the globalL2regularization factor. You can specify the globalL2使用的正规化因子使用训练function.

Data Types:单身的|double|int8|int16|int32|int64|UINT8|uint16|UINT32|Uint64

层name, specified as a character vector or a string scalar. For数组输入,trainNetwork,assembleNetwork,LayerGraph, 和dlnetworkfunctions automatically assign names to layers with name''

Data Types:char|细绳

This property is read-only.

Number of inputs of the layer. This layer accepts a single input only.

Data Types:double

This property is read-only.

层的输入名称。该层仅接受单个输入。

Data Types:cell

This property is read-only.

输出数量of the layer. This layer has a single output only.

Data Types:double

This property is read-only.

层的输出名称。该层仅具有单个输出。

Data Types:cell

Examples

collapse all

创建一个带有32滤波器的转置3D卷积层,每个卷积层的高度,宽度和深度为11。在水平和垂直方向上使用4步,沿深度2。

layer = transposedConv3dLayer(11,32,'Stride',[4 4 2])
layer = TransposedConvolution3DLayer with properties: Name: '' Hyperparameters FilterSize: [11 11 11] NumChannels: 'auto' NumFilters: 32 Stride: [4 4 2] CroppingMode: 'manual' CroppingSize: [2x3 double] Learnable Parameters Weights: [] Bias: [] Show all properties

算法

expand all

References

[1] Glorot, Xavier, and Yoshua Bengio. "Understanding the Difficulty of Training Deep Feedforward Neural Networks." In第十三国际人工智能与统计会议论文集, 249–356. Sardinia, Italy: AISTATS, 2010.

[2] He, Kaiming, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. "Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification." InProceedings of the 2015 IEEE International Conference on Computer Vision, 1026–1034. Washington, DC: IEEE Computer Vision Society, 2015.

Version History

Introduced in R2019a