Files
openvino/docs/ops/convolution/GroupConvolutionBackpropData_1.md
Gabriele Galiero Casay 91a8de127d Convolution group operations alignment (#4387)
* Convolution: Enhance dynamic shape inference of validate and infer types method

* Convolution: Change onnx test with dynamic shapes to float element type

* Convolution: Remove test instances with integer precision

* Convolution: Add backticks to types in spec

* Convolution: Change element type variable for output element type

* GroupConvolution: Add backticks to types in spec

* GroupConvolution: Enhance dynamic shape inference of validate and infer types method

* GroupConvolution: Remove serialization test instances with integer precision

* GroupConvolutionBackpropData: Remove serialization test instances with integer precision

* GroupConvolutionBackpropData: Enhance dynamic shape inference of validate and infer types method

* Convolution: Add helper function to validate convolution parameters in ref impl

* Convolution: Rewrite lambda to capture spatial dims of filters in validate and infer types

* GroupConvolution: Refactor reference implementation

* Remove call to old implementation of convolution using dilations
* Added validation method to validate shapes

* GroupConvolutionBackpropData: Add more type_prop unit test and refactor test names

* Convolution: Extended validation of convolution parameters in reference implementation

* GroupConvolution: Extended validation of group convolution parameters in reference implementation

* GroupConvolutionBackpropData: Add helper function to validate convolution backprop parameters in ref impl

* Clean up unnecessary lines

* BinaryConvolution: Use validate helper function from convolution ref impl

* Convolution: Refactor validate and infer types to improve readability

* BinaryConvolution: Refactor validate and infer types to improve readability

* Convolution: Add explicit tensor shape dims for inputs and outputs in spec

* BinaryConvolution: Add explicit tensor shape dims for inputs and outputs in spec

* GroupConvolution: Add explicit tensor shape dims for inputs and outputs in spec

* Add helper function to infer convolution forward output shape

* Convolution: Refactor validate and infer types to use helpers to infer output shape

* BinaryConvolution: Refactor validate and infer types to use helpers to infer output shape

* GroupConvolutionBackpropData: Fix formula to calculate output shape in validation functions

* Remove symbol to export convolution output shape inference function

* GroupConvolution: Add validation checks for input channels dim of data batch and filter shape

* GroupConvolutionBackpropData: clean up type prop tests

* Convolution: Change element type in onnx unit tests with dyn shapes and convolution nodes

* GroupConvolutionBackpropData: Correct layout of filters input

* GroupConvolution: Deduce groups from inputs shape during output shape inference

* Change spec supported types of convolution operations to any numeric type

* Revert "GroupConvolution: Remove serialization test instances with integer precision"

This reverts commit 781c2570d6.

* Revert "GroupConvolutionBackpropData: Remove serialization test instances with integer precision"

This reverts commit 9a6ac23968.

* Revert "Convolution: Remove test instances with integer precision"

This reverts commit 0b07052a62.

* Revert "Convolution: Change element type in onnx unit tests with dyn shapes and convolution nodes"

This reverts commit c9f5944b6b.

* Revert "Convolution: Change onnx test with dynamic shapes to float element type"

This reverts commit 1f4202b010.

* Allow integral types in validate and infer types method for convolution group of operations

* Add i32 precision in single layer tests for convolution group of operations

* BinaryConvolution: Fix shape of input and output tensors in spec

* Address nitpick comments
2021-04-06 14:36:12 +03:00

6.7 KiB

GroupConvolutionBackpropData

Versioned name: GroupConvolutionBackpropData-1

Category: Convolution

Short description: Computes 1D, 2D or 3D GroupConvolutionBackpropData of input and kernel tensors.

Detailed description: Splits input and filters into multiple groups, computes ConvolutionBackpropData on them and concatenates the results. It is equivalent to GroupConvolution and Convolution relationship.

Attributes: The operation has the same attributes as a ConvolutionBackpropData. Number of groups is derived from the kernel shape.

  • strides

    • Description: strides has the same definition as strides for a regular Convolution but applied in the backward way, for the output tensor.
    • Range of values: positive integers
    • Type: int[]
    • Default value: None
    • Required: yes
  • pads_begin

    • Description: pads_begin has the same definition as pads_begin for a regular Convolution but applied in the backward way, for the output tensor. May be omitted, in which case pads are calculated automatically.
    • Range of values: non-negative integers
    • Type: int[]
    • Default value: None
    • Required: yes
    • Note: the attribute is ignored when auto_pad attribute is specified.
  • pads_end

    • Description: pads_end has the same definition as pads_end for a regular Convolution but applied in the backward way, for the output tensor. May be omitted, in which case pads are calculated automatically.
    • Range of values: non-negative integers
    • Type: int[]
    • Default value: None
    • Required: yes
    • Note: the attribute is ignored when auto_pad attribute is specified.
  • dilations

    • Description: dilations has the same definition as dilations for a regular Convolution but applied in the backward way, for the output tensor.
    • Range of values: positive integers
    • Type: int[]
    • Default value: None
    • Required: yes
  • auto_pad

    • Description: auto_pad has the same definition as auto_pad for a regular Convolution but applied in the backward way, for the output tensor.
      • explicit - use explicit padding values from pads_begin and pads_end.
      • same_upper - the input is padded to match the output size. In case of odd padding value an extra padding is added at the end.
      • same_lower - the input is padded to match the output size. In case of odd padding value an extra padding is added at the beginning.
      • valid - do not use padding.
    • Type: string
    • Default value: explicit
    • Required: no
    • Note: pads_begin and pads_end attributes are ignored when auto_pad is specified.
  • output_padding

    • Description: output_padding adds additional amount of paddings per each spatial axis in the output tensor. It unlocks more elements in the output allowing them to be computed. Elements are added at the higher coordinate indices for the spatial dimensions. Number of elements in output_padding list matches the number of spatial dimensions in input and output tensors.
    • Range of values: non-negative integer values
    • Type: int[]
    • Default value: all zeros
    • Required: no

Inputs:

  • 1: Input tensor of type T1 and rank 3, 4 or 5. Layout is [N, GROUPS * C_IN, Z, Y, X] (number of batches, number of channels, spatial axes Z, Y, X). Required.

  • 2: Kernel tensor of type T1 and rank 4, 5 or 6. Layout is [GROUPS, C_IN, C_OUT, X, Y, Z] (number of groups, number of input channels, number of output channels, spatial axes X, Y, Z). Required.

  • 3: Output shape tensor of type T2 and rank 1. It specifies spatial shape of the output. Optional.

  • Note Number of groups is derived from the shape of the kernel and not specified by any attribute.

  • Note: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:

    • 1D convolution (input tensors rank 3) means that there is only one spatial axis X
    • 2D convolution (input tensors rank 4) means that there are two spatial axes Y, X
    • 3D convolution (input tensors rank 5) means that there are three spatial axes Z, Y, X

Outputs:

  • 1: Output tensor of type T1 and rank 3, 4 or 5 (the same as input 1). Layout is [N, GROUPS * C_OUT, Z, Y, X] (number of batches, number of kernel output channels, spatial axes Z, Y, X).

Types:

  • T1: any numeric type.
  • T2: any integer type.

Example

1D GroupConvolutionBackpropData

<layer id="5" name="upsampling_node" type="GroupConvolutionBackpropData">
    <data dilations="1" pads_begin="1" pads_end="1" strides="2"/>
    <input>
        <port id="0">
            <dim>1</dim>
            <dim>20</dim>
            <dim>224</dim>
        </port>
        <port id="1">
            <dim>4</dim>
            <dim>5</dim>
            <dim>2</dim>
            <dim>3</dim>
        </port>
    </input>
    <output>
        <port id="0" precision="FP32">
            <dim>1</dim>
            <dim>8</dim>
            <dim>447</dim>
        </port>
    </output>
</layer>

2D GroupConvolutionBackpropData

<layer id="5" name="upsampling_node" type="GroupConvolutionBackpropData">
    <data dilations="1,1" pads_begin="1,1" pads_end="1,1" strides="2,2"/>
    <input>
        <port id="0">
            <dim>1</dim>
            <dim>20</dim>
            <dim>224</dim>
            <dim>224</dim>
        </port>
        <port id="1">
            <dim>4</dim>
            <dim>5</dim>
            <dim>2</dim>
            <dim>3</dim>
            <dim>3</dim>
        </port>
    </input>
    <output>
        <port id="0" precision="FP32">
            <dim>1</dim>
            <dim>8</dim>
            <dim>447</dim>
            <dim>447</dim>
        </port>
    </output>
</layer>

3D GroupConvolutionBackpropData

<layer id="5" name="upsampling_node" type="GroupConvolutionBackpropData">
    <data dilations="1,1,1" pads_begin="1,1,1" pads_end="1,1,1" strides="2,2,2"/>
    <input>
        <port id="0">
            <dim>1</dim>
            <dim>20</dim>
            <dim>224</dim>
            <dim>224</dim>
            <dim>224</dim>
        </port>
        <port id="1">
            <dim>4</dim>
            <dim>5</dim>
            <dim>2</dim>
            <dim>3</dim>
            <dim>3</dim>
            <dim>3</dim>
        </port>
    </input>
    <output>
        <port id="0" precision="FP32">
            <dim>1</dim>
            <dim>8</dim>
            <dim>447</dim>
            <dim>447</dim>
            <dim>447</dim>
        </port>
    </output>
</layer>