tf.nn.atrous_conv2d_transpose
Stay organized with collections
Save and categorize content based on your preferences.
The transpose of atrous_conv2d
.
tf.nn.atrous_conv2d_transpose(
value, filters, output_shape, rate, padding, name=None
)
This operation is sometimes called "deconvolution" after
(Zeiler et al., 2010), but is really the transpose (gradient) of
atrous_conv2d
rather than an actual deconvolution.
Args |
value
|
A 4-D Tensor of type float . It needs to be in the default NHWC
format. Its shape is [batch, in_height, in_width, in_channels] .
|
filters
|
A 4-D Tensor with the same type as value and shape
[filter_height, filter_width, out_channels, in_channels] . filters '
in_channels dimension must match that of value . Atrous convolution is
equivalent to standard convolution with upsampled filters with effective
height filter_height + (filter_height - 1) * (rate - 1) and effective
width filter_width + (filter_width - 1) * (rate - 1) , produced by
inserting rate - 1 zeros along consecutive elements across the
filters ' spatial dimensions.
|
output_shape
|
A 1-D Tensor of shape representing the output shape of the
deconvolution op, of form [batch, out_height, out_width, out_channels] .
|
rate
|
A positive int32. The stride with which we sample input values across
the height and width dimensions. Equivalently, the rate by which we
upsample the filter values by inserting zeros across the height and
width dimensions. In the literature, the same parameter is sometimes
called input stride or dilation .
|
padding
|
A string, either 'VALID' or 'SAME' . The padding algorithm. See
here
for more information.
|
name
|
Optional name for the returned tensor.
|
Returns |
A Tensor with the same type as value .
|
Raises |
ValueError
|
If input/output depth does not match filters ' shape, or if
padding is other than 'VALID' or 'SAME' , or if the rate is less
than one, or if the output_shape is not a tensor with 4 elements.
|
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.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.nn.atrous_conv2d_transpose\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/ops/nn_ops.py#L2814-L2976) |\n\nThe transpose of `atrous_conv2d`.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.nn.atrous_conv2d_transpose`](https://www.tensorflow.org/api_docs/python/tf/nn/atrous_conv2d_transpose)\n\n\u003cbr /\u003e\n\n tf.nn.atrous_conv2d_transpose(\n value, filters, output_shape, rate, padding, name=None\n )\n\nThis operation is sometimes called \"deconvolution\" after\n(Zeiler et al., 2010), but is really the transpose (gradient) of\n`atrous_conv2d` rather than an actual deconvolution.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `value` | A 4-D `Tensor` of type `float`. It needs to be in the default `NHWC` format. Its shape is `[batch, in_height, in_width, in_channels]`. |\n| `filters` | A 4-D `Tensor` with the same type as `value` and shape `[filter_height, filter_width, out_channels, in_channels]`. `filters`' `in_channels` dimension must match that of `value`. Atrous convolution is equivalent to standard convolution with upsampled filters with effective height `filter_height + (filter_height - 1) * (rate - 1)` and effective width `filter_width + (filter_width - 1) * (rate - 1)`, produced by inserting `rate - 1` zeros along consecutive elements across the `filters`' spatial dimensions. |\n| `output_shape` | A 1-D `Tensor` of shape representing the output shape of the deconvolution op, of form `[batch, out_height, out_width, out_channels]`. |\n| `rate` | A positive int32. The stride with which we sample input values across the `height` and `width` dimensions. Equivalently, the rate by which we upsample the filter values by inserting zeros across the `height` and `width` dimensions. In the literature, the same parameter is sometimes called `input stride` or `dilation`. |\n| `padding` | A string, either `'VALID'` or `'SAME'`. The padding algorithm. See [here](https://www.tensorflow.org/api_docs/python/tf/nn#notes_on_padding_2) for more information. |\n| `name` | Optional name for the returned tensor. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` with the same type as `value`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ValueError` | If input/output depth does not match `filters`' shape, or if padding is other than `'VALID'` or `'SAME'`, or if the `rate` is less than one, or if the output_shape is not a tensor with 4 elements. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| References ---------- ||\n|---|---|\n| Deconvolutional Networks: [Zeiler et al., 2010](https://ieeexplore.ieee.org/abstract/document/5539957) ([pdf](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.232.4023&rep=rep1&type=pdf)) ||\n\n\u003cbr /\u003e"]]