FilesLast commitLast update
13 days ago
8 months ago
10 months ago
19 days ago
3 months ago
3 months ago
10 months ago
19 days ago
7 days ago
README

PadV4Grad

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products ×
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products ×
Atlas inference products ×
Atlas training products ×

Function Description

  • Operator function: backpropagation of reflection_pad1d/reflection_pad2d.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
gradOutput Input Forward propagation of reflection_pad1d/reflection_pad2d. The shape supports 2 to 4 dimensions, and the dimensions must be consistent with self and gradInput. The backward operator of reflection_pad1d corresponds to 2/3 dimensions, and the backward operator of reflection_pad2d corresponds to 3/4 dimensions. BFLOAT16, FLOAT16, FLOAT32, DOUBLE, COMPLEX64, COMPLEX128 ND
self Input The shape supports 2 to 4 dimensions, and the dimensions must be consistent with self and gradInput. The shape is the same as that of gradInput. BFLOAT16, FLOAT16, FLOAT32, DOUBLE, COMPLEX64, COMPLEX128 ND
padding Input padding describes the size of outward padding, and its length is 2 or 4.
  • When the length is 2, it indicates the values to be padded on the left and right for 1d, and the first two values of padding must be smaller than the value of the last dimension of self.
  • When the length is 4, it indicates the values to be padded on the left, right, top, and bottom for 2d. The first two values of padding must be smaller than the value of the last dimension of self, and the last two values must be smaller than the value of the second-to-last dimension.
  • INT64
    gradInput Output The data type is the same as that of self. BFLOAT16, FLOAT16, FLOAT32, DOUBLE, COMPLEX64, COMPLEX128 ND

    Constraint Description

    • Input shape restriction: the dimensions of gradOutput, self, and gradInput must be consistent (three or four dimensions are supported), and their shapes must be consistent with the output shape of the forward propagation of reflection_pad1d/reflection_pad2d.

    • Input value range restriction: when the length of padding is 2, the first two values of padding must be smaller than the value of the last dimension of self; when the length is 4, the first two values of padding must be smaller than the value of the last dimension of self, and the last two values must be smaller than the value of the second-to-last dimension.

    Invocation Description

    Invocation Method Invocation Sample Description
    aclnn invocation test_aclnn_reflection_pad1d_backward.cpp Invokes the PadV4Grad operator through the aclnnReflectionPad1dBackward API.