A pix2pixHD generator network consists of an encoder module followed by
a decoder module. The default network follows the architecture proposed by Wang et. al.
[1].
The encoder module downsamples the input by a factor of
2^NumDownsamplingBlocks. The encoder module consists of an initial
block of layers, NumDownsamplingBlocks downsampling blocks, and
NumResidualBlocks residual blocks. The decoder module upsamples the
input by a factor of 2^NumDownsamplingBlocks. The decoder module
consists of NumDownsamplingBlocks upsampling blocks and a final block.
The table describes the blocks of layers that comprise the encoder and decoder modules.
Block TypeLayersDiagram of Default BlockInitial blockAn imageInputLayer(Deep Learning Toolbox)
A convolution2dLayer(Deep Learning Toolbox) with a stride of [1 1] and a filter size of
FilterSizeInFirstAndLastBlocks
An optional normalization layer, specified by the
NormalizationLayer name-value argument.
An activation layer specified by the
ActivationLayer name-value argument.
Downsampling blockA convolution2dLayer(Deep Learning Toolbox) with a stride of [2 2] to perform
downsampling. The convolution layer has a filter size of
FilterSizeInIntermediateBlocks.
An optional normalization layer, specified by the
NormalizationLayer name-value argument.
An activation layer specified by the
ActivationLayer name-value argument.
Residual blockA convolution2dLayer(Deep Learning Toolbox) with a stride of [1 1] and a filter size of
FilterSizeInIntermediateBlocks.
An optional normalization layer, specified by the
NormalizationLayer name-value argument.
An activation layer specified by the
ActivationLayer name-value argument.
An optional dropoutLayer(Deep Learning Toolbox). By default, residual blocks omit a dropout layer.
Include a dropout layer by specifying the Dropout
name-value argument as a value in the range (0, 1].
A second convolution2dLayer(Deep Learning Toolbox).
An optional second normalization layer.
An additionLayer(Deep Learning Toolbox) that provides a skip connection between every
block.
Upsampling blockAn upsampling layer that upsamples by a factor of 2 according to the
UpsampleMethod name-value argument. The convolution
layer has a filter size of
FilterSizeInIntermediateBlocks.
An optional normalization layer, specified by the
NormalizationLayer name-value argument.
An activation layer specified by the
ActivationLayer name-value argument.
Final blockA convolution2dLayer(Deep Learning Toolbox) with a stride of [1 1] and a filter size of
FilterSizeInFirstAndLastBlocks.
An optional activation layer specified by the
FinalActivationLayer name-value argument.