FilesLast commitLast update
16 hours ago
4 months ago
6 days ago
10 months ago
5 days ago
1 month ago
6 days ago
19 days ago
1 month ago
6 days ago
README

CircularPadGrad

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: backward propagation operation of CircularPad.
  • CircularPad2dBackward: computes the backward propagation of CircularPad2d.
  • CircularPad3dBackward: computes the backward propagation of CircularPad3d.

Parameter Description

CircularPad2dBackward

Parameter Name Input/Output/Attribute Description Data Type Data Format
gradOutput Input tensor Gradient data input during backward propagation, whose shape must be the same as the output of the circular_pad2d forward propagation. FLOAT16, BFLOAT16, FLOAT32 ND
self Input tensor Original input data to be padded during forward propagation, whose shape is the same as gradInput. FLOAT16, BFLOAT16, FLOAT32 ND
padding Input array Padding dimensions during forward propagation, with a length of 4. The values sequentially represent the padding values for left, right, top, and bottom. INT64 -
gradInput Output tensor Gradient data output during backward propagation, whose shape is the same as self. FLOAT16, BFLOAT16, FLOAT32 ND

CircularPad3dBackward

Parameter Name Input/Output/Attribute Description Data Type Data Format
gradOutput Input tensor Gradient data input during backward propagation, whose shape must be the same as the output of the circular_pad3d forward propagation. FLOAT16, BFLOAT16, FLOAT32 ND
self Input tensor Original input data to be padded during forward propagation, whose shape is the same as gradInput. FLOAT16, BFLOAT16, FLOAT32 ND
padding Input array Padding dimensions during forward propagation, with a length of 6. The values sequentially represent the padding values for left, right, top, bottom, front, and back. INT64 -
gradInput Output tensor Gradient data output during backward propagation, whose shape is the same as self. FLOAT16, BFLOAT16, FLOAT32 ND

Constraint Description

  • The size of the last dimension of gradOutput under different types must meet the following constraints:
    • float16/bfloat16: (0, 16384)
    • float32: (0, 24576)
  • Each padding value must be less than the size of the corresponding dimension.
  • The data types of the input and output must be the same.
  • The shape of gradOutput must be the same as the output of the forward propagation.
  • The shape of gradInput must be the same as self.

Invocation Description

Invocation Method Sample Code Description
aclnn API test_aclnn_circular_pad_grad Invokes the CircularPad2dBackward operator through the aclnnCircularPad2dBackward API.
aclnn API test_aclnn_circular_pad3d_backward Invokes the CircularPad3dBackward operator through the aclnnCircularPad3dBackward API.