ConvolutionBackwardData#
ConvolutionBackwardData operation accepts \(\diffdst\), weights and optional dst shape as inputs, and compute the \(\diffsrc\).
If auto_pad
attribute is specified to one of valid
,
same_upper
and same_lower
, pads_begin
and pads_end
attributes will be ignored. The paddings will be calculated by following
the below formula:
Let the parameters be:
Parameter |
Depth |
Height |
Width |
Comment |
---|---|---|---|---|
Paddings: Front, top, and left |
\(PD_L\) |
\(PH_L\) |
\(PW_L\) |
In the
attributes
we use
|
Padding: Back, bottom, and right |
\(PD_R\) |
\(PH_R\) |
\(PW_R\) |
In the
attributes
we use
|
Stride |
\(SD\) |
\(SH\) |
\(SW\) |
In the
attributes
we use
|
Dilation |
\(DD\) |
\(DH\) |
\(DW\) |
In the
attributes
we use
|
Firstly, \(total\_padding\) is calculated according to \(src\_shape\) and \(dst\_shape\). Let \(src\_h\) be height dimension of \(src\_shape\) and \(dst\_h\) be height dimension of \(dst\_shape\).
If auto_pad
attribute is specified as valid
:
If auto_pad
attribute is specified as same_lower
:
If auto_pad
attribute is specified as same_upper
:
where:
\(dst\_shape\) is either an attribute or an input tensor,
\(output\_padding\) is an optional attribute.
Operation Attributes#
|
Description |
Value Type |
|
|
---|---|---|---|---|
Controls the strides the weights tensor is moved when computing convolution |
s64 |
A s64 list containing positive values |
Required |
|
Controls
number of
zeros to be
add to the
front/top/left
of spatial
dimensions,
the
attribute
will be
ignored
when
|
s64 |
A s64 list containing non-negative values |
Required |
|
Controls
number of
zeros to be
add to the
back/bottom/right
of spatial
dimensions,
the
attribute
will be
ignored
when
|
s64 |
A s64 list containing non-negative values |
Required |
|
Controls the amount of stretching the kernel before convolution |
s64 |
A s64 list containing positive values (>1 means dilated convolution) |
Required |
|
Controls how the padding is calculated |
string |
|
Optional |
|
Adds
additional
amount of
padding per
each
spatial
axis in
|
s64 |
A s64 list containing non-negative values, all zeros by default |
Optional |
|
Controls how input channels and output channels are divided into |
s64 |
A positive
s64 value,
|
Optional |
|
Controls
how to
interpret
the shape
of |
string |
|
Optional |
|
Controls
how to
interpret
the shape
of
|
string |
|
Optional |
|
Denotes the
shape of
the |
s64 |
A s64 list containing positive values |
Optional |
Execution Arguments#
The inputs and outputs must be provided according to the below index order when constructing an operation.
Inputs#
Index |
Argument Name |
Required or Optional |
---|---|---|
0 |
|
Required |
1 |
|
Required |
2 |
|
Optional |
@note The shape of weights is
\((out\_channels, in\_channels / groups, spatial\_shape)\)
for OIX
format or
\((spatial\_shape, in\_channels / groups, out\_channels)\)
for XIO
format. Both \(in\_channels\) and
\(out\_channels\) must be divisible by groups attribute.
@note Either dst_shape
input or dst_shape
attribute should be
provided. If both provided, dst_shape
input will precede over
dst_shape
attribute.
Outputs#
Index |
Argument Name |
Required or Optional |
---|---|---|
0 |
|
Required |
Supported Data Types#
ConvolutionBackwardData operation supports the following data type combinations.
Diff_dst |
Weights |
Diff_src |
Dst_shape |
---|---|---|---|
f32 |
f32 |
f32 |
s32 |
bf16 |
bf16 |
bf16 |
s32 |
f16 |
f16 |
f16 |
s32 |