FilesLast commitLast update
5 days ago
10 months ago
10 months ago
6 days ago
3 months ago
22 days ago
10 months ago
19 days ago
7 days ago
README

PadV3GradReplicate

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 replication_pad1d/replication_pad2d.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
gradOutput Input Forward propagation of replication_pad1d/replication_pad2d. The shape supports 2 to 4 dimensions, and the dimensions must be consistent with self and gradInput. 2/3 dimensions indicate 1d, and 3/4 dimensions indicate 2d. 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. 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. 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 replication_pad1d/replication_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_pad_v3_grad_replicate.cpp Invokes the PadV3GradReplicate operator through the aclnnReplicationPad1dBackward API.
    aclnn invocation test_aclnn_replication_pad2d_backward Invokes the PadV3GradReplicate operator through the aclnnReplicationPad2dBackward API.