![]() |
The transpose of convolution
.
Aliases:
tf.nn.conv_transpose(
input,
filters,
output_shape,
strides,
padding='SAME',
data_format=None,
dilations=None,
name=None
)
This operation is sometimes called "deconvolution" after Deconvolutional
Networks, but is
actually the transpose (gradient) of convolution
rather than an actual
deconvolution.
Args:
input
: An N+2 dimensionalTensor
of shape[batch_size] + input_spatial_shape + [in_channels]
if data_format does not start with "NC" (default), or[batch_size, in_channels] + input_spatial_shape
if data_format starts with "NC". It must be one of the following types:half
,bfloat16
,float32
,float64
.filters
: An N+2 dimensionalTensor
with the same type asinput
and shapespatial_filter_shape + [in_channels, out_channels]
.output_shape
: A 1-DTensor
representing the output shape of the deconvolution op.strides
: An int or list ofints
that has length1
,N
orN+2
. The stride of the sliding window for each dimension ofinput
. If a single value is given it is replicated in the spatial dimensions. By default theN
andC
dimensions are set to 0. The dimension order is determined by the value ofdata_format
, see below for details.padding
: A string, either'VALID'
or'SAME'
. The padding algorithm. See the "returns" section oftf.nn.convolution
for details.data_format
: A string or None. Specifies whether the channel dimension of theinput
and output is the last dimension (default, or ifdata_format
does not start with "NC"), or the second dimension (ifdata_format
starts with "NC"). For N=1, the valid values are "NWC" (default) and "NCW". For N=2, the valid values are "NHWC" (default) and "NCHW". For N=3, the valid values are "NDHWC" (default) and "NCDHW".dilations
: An int or list ofints
that has length1
,N
orN+2
, defaults to 1. The dilation factor for each dimension ofinput
. If a single value is given it is replicated in the spatial dimensions. By default theN
andC
dimensions are set to 1. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value ofdata_format
, see above for details.name
: A name for the operation (optional). If not specified "conv_transpose" is used.
Returns:
A Tensor
with the same type as value
.