r"""Computes the gradients of convolution with respect to the input. Args: input_sizes: A `Tensor` of type `int32`. An integer vector representing the shape of `input`, where `input` is a 4-D `[batch, height, width, channels]` tensor. filter: A `Tensor`. Must be one of the fol
( # pylint: disable=redefined-builtin,dangerous-default-value
input_sizes,
filter=None,
out_backprop=None,
strides=None,
padding=None,
use_cudnn_on_gpu=True,
data_format="NHWC",
dilations=[1, 1, 1, 1],
name=None,
filters=None)
| 2114 | |
| 2115 | @tf_export(v1=["nn.conv2d_backprop_input"]) |
| 2116 | def conv2d_backprop_input( # pylint: disable=redefined-builtin,dangerous-default-value |
| 2117 | input_sizes, |
| 2118 | filter=None, |
| 2119 | out_backprop=None, |
| 2120 | strides=None, |
| 2121 | padding=None, |
| 2122 | use_cudnn_on_gpu=True, |
| 2123 | data_format="NHWC", |
| 2124 | dilations=[1, 1, 1, 1], |
| 2125 | name=None, |
| 2126 | filters=None): |
| 2127 | r"""Computes the gradients of convolution with respect to the input. |
| 2128 | |
| 2129 | Args: |
| 2130 | input_sizes: A `Tensor` of type `int32`. |
| 2131 | An integer vector representing the shape of `input`, |
| 2132 | where `input` is a 4-D `[batch, height, width, channels]` tensor. |
| 2133 | filter: A `Tensor`. Must be one of the following types: |
| 2134 | `half`, `bfloat16`, `float32`, `float64`. |
| 2135 | 4-D with shape |
| 2136 | `[filter_height, filter_width, in_channels, out_channels]`. |
| 2137 | out_backprop: A `Tensor`. Must have the same type as `filter`. |
| 2138 | 4-D with shape `[batch, out_height, out_width, out_channels]`. |
| 2139 | Gradients w.r.t. the output of the convolution. |
| 2140 | strides: A list of `ints`. |
| 2141 | The stride of the sliding window for each dimension of the input |
| 2142 | of the convolution. Must be in the same order as the dimension specified |
| 2143 | with format. |
| 2144 | padding: Either the `string `"SAME"` or `"VALID"` indicating the type of |
| 2145 | padding algorithm to use, or a list indicating the explicit paddings at |
| 2146 | the start and end of each dimension. When explicit padding is used and |
| 2147 | data_format is `"NHWC"`, this should be in the form `[[0, 0], [pad_top, |
| 2148 | pad_bottom], [pad_left, pad_right], [0, 0]]`. When explicit padding used |
| 2149 | and data_format is `"NCHW"`, this should be in the form `[[0, 0], [0, 0], |
| 2150 | [pad_top, pad_bottom], [pad_left, pad_right]]`. |
| 2151 | use_cudnn_on_gpu: An optional `bool`. Defaults to `True`. |
| 2152 | data_format: An optional `string` from: `"NHWC", "NCHW"`. |
| 2153 | Defaults to `"NHWC"`. |
| 2154 | Specify the data format of the input and output data. With the |
| 2155 | default format "NHWC", the data is stored in the order of: |
| 2156 | [batch, in_height, in_width, in_channels]. |
| 2157 | Alternatively, the format could be "NCHW", the data storage order of: |
| 2158 | [batch, in_channels, in_height, in_width]. |
| 2159 | dilations: An optional list of `ints`. Defaults to `[1, 1, 1, 1]`. |
| 2160 | 1-D tensor of length 4. The dilation factor for each dimension of |
| 2161 | `input`. If set to k > 1, there will be k-1 skipped cells between each |
| 2162 | filter element on that dimension. The dimension order is determined by |
| 2163 | the value of `data_format`, see above for details. Dilations in the batch |
| 2164 | and depth dimensions must be 1. |
| 2165 | name: A name for the operation (optional). |
| 2166 | filters: Alias for filter. |
| 2167 | |
| 2168 | Returns: |
| 2169 | A `Tensor`. Has the same type as `filter`. |
| 2170 | """ |
| 2171 | filter = deprecation.deprecated_argument_lookup( |
| 2172 | "filters", filters, "filter", filter) |
| 2173 | padding, explicit_paddings = _convert_padding(padding) |
nothing calls this directly
no test coverage detected