tf.compat.v1.nn.conv2d_transpose  |  TensorFlow v2.16.1 (original) (raw)

tf.compat.v1.nn.conv2d_transpose

Stay organized with collections Save and categorize content based on your preferences.

The transpose of conv2d.

tf.compat.v1.nn.conv2d_transpose(
    value=None,
    filter=None,
    output_shape=None,
    strides=None,
    padding='SAME',
    data_format='NHWC',
    name=None,
    input=None,
    filters=None,
    dilations=None
)

This operation is sometimes called "deconvolution" after (Zeiler et al., 2010), but is really the transpose (gradient) of conv2drather than an actual deconvolution.

Args
value A 4-D Tensor of type float and shape[batch, height, width, in_channels] for NHWC data format or[batch, in_channels, height, width] for NCHW data format.
filter A 4-D Tensor with the same type as value and shape[height, width, output_channels, in_channels]. filter'sin_channels dimension must match that of value.
output_shape A 1-D Tensor representing the output shape of the deconvolution op.
strides An int or list of ints that has length 1, 2 or 4. The stride of the sliding window for each dimension of input. If a single value is given it is replicated in the H and W dimension. By default the N and C dimensions are set to 0. The dimension order is determined by the value of data_format, see below for details.
padding A string, either 'VALID' or 'SAME'. The padding algorithm. See the "returns" section of tf.nn.convolution for details.
data_format A string. 'NHWC' and 'NCHW' are supported.
name Optional name for the returned tensor.
input Alias for value.
filters Alias for filter.
dilations An int or list of ints that has length 1, 2 or 4, defaults to 1. The dilation factor for each dimension ofinput. If a single value is given it is replicated in the H and W dimension. By default the N and C 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 of data_format, see above for details. Dilations in the batch and depth dimensions if a 4-d tensor must be 1.
Returns
A Tensor with the same type as value.
Raises
ValueError If input/output depth does not match filter's shape, or if padding is other than 'VALID' or 'SAME'.
References
Deconvolutional Networks:Zeiler et al., 2010(pdf)

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.

Last updated 2024-04-26 UTC.