DeconvolutionLayer
DeconvolutionLayer[n,sz]
represents a trainable deconvolutional net layer having n output channels and using kernels of size sz to compute the deconvolution.
DeconvolutionLayer[n,{s}]
represents a layer performing one-dimensional deconvolutions with kernels of size s.
DeconvolutionLayer[n,{h,w}]
represents a layer performing two-dimensional deconvolutions with kernels of size h×w.
DeconvolutionLayer[n,kernel,opts]
includes options for initial kernels and other parameters.
Details and Options




- DeconvolutionLayer[…][input] explicitly computes the output from applying the layer to input.
- DeconvolutionLayer[…][{input1,input2,…}] explicitly computes outputs for each of the inputi.
- The following optional parameters can be included:
-
"Biases" Automatic initial vector of kernel biases "ChannelGroups" 1 number of channel groups "Dilation" 1 dilation factor Interleaving False the position of the channel dimension LearningRateMultipliers Automatic learning rate multipliers for kernel weights and/or biases PaddingSize 0 amount of padding to remove from the output "Stride" 1 convolution step size to use "Weights" Automatic initial matrix of kernel weights - The settings for PaddingSize, "Dilation" and "Stride" can be of the following forms:
-
n use the value n for all dimensions {…,ni,…} use the value ni for the i dimension
- By setting "GroupNumber"g, the m input channels and n output channels are split into g groups of m/g and n/g channels, respectively, where m and n are required to be divisible by g. Separate deconvolutions are performed connecting the i
group of input channels with the i
group of output channels, and results are concatenated in the output. Each input/output group pair is connected by n/g×m/g deconvolution, so setting "GroupNumber"g effectively reduces the number of distinct deconvolutions from n×m to n×m/g.
- With Automatic settings, weights and biases are added automatically when NetInitialize or NetTrain is used.
- The setting "Biases"->None specifies that no biases should be used.
- With the setting InterleavingFalse, the channel dimension is taken to be the first dimension of the input and output arrays.
- With the setting InterleavingTrue, the channel dimension is taken to be the last dimension of the input and output arrays.
- If weights and biases have been added, DeconvolutionLayer[…][input] explicitly computes the output from applying the layer.
- DeconvolutionLayer[…][{input1,input2,…}] explicitly computes outputs for each of the inputi.
- When given a NumericArray as input, the output will be a NumericArray.
- NetExtract can be used to extract weights and biases from a DeconvolutionLayer object.
- DeconvolutionLayer is typically used inside NetChain, NetGraph, etc.
- DeconvolutionLayer exposes the following ports for use in NetGraph etc.:
-
"Input" a rank-3 array "Output" a rank-3 array - When it cannot be inferred from other layers in a larger net, the option "Input"->{d1,d2,d3} can be used to fix the input dimensions of DeconvolutionLayer.
- Given an input array of dimensions d1×d2×d3, the output array will be of dimensions
×
×
, where the channel dimension
=n and the sizes d2 and d3 are transformed according to
=s(di-1)+df(k-1)+1-2p,where df is the dilation factor, p is the padding size, k is the kernel size, and s is the stride size for each dimension.
- Options[DeconvolutionLayer] gives the list of default options to construct the layer. Options[DeconvolutionLayer[…]] gives the list of default options to evaluate the layer on some data.
- Information[DeconvolutionLayer[…]] gives a report about the layer.
- Information[DeconvolutionLayer[…],prop] gives the value of the property prop of DeconvolutionLayer[…]. Possible properties are the same as for NetGraph.
Examples
open allclose allBasic Examples (3)
Create a DeconvolutionLayer with five output channels and a 2×2 kernel size:
Create a randomly initialized DeconvolutionLayer with the input dimensions specified:
Apply the layer to an input tensor to produce an output tensor:
Create a randomly initialized DeconvolutionLayer that takes in an image and produces an image:
Options (7)
Interleaving (1)
Create a DeconvolutionLayer with InterleavingFalse and one input channel:
Create a DeconvolutionLayer with InterleavingTrue and one input channel:
"Dilation" (2)
A dilation factor of size n on a given dimension effectively applies the kernel to elements of the output arrays that are distance n apart.
Create a one-dimensional DeconvolutionLayer with a dilation factor of 2:
Create a random two-dimensional DeconvolutionLayer with a dilation factor of 5:
"Weights" (1)
"Biases" (1)
Create a randomly initialized DeconvolutionLayer without biases:
Text
Wolfram Research (2016), DeconvolutionLayer, Wolfram Language function, https://reference.wolfram.com/language/ref/DeconvolutionLayer.html (updated 2020).
CMS
Wolfram Language. 2016. "DeconvolutionLayer." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/DeconvolutionLayer.html.
APA
Wolfram Language. (2016). DeconvolutionLayer. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeconvolutionLayer.html