FilesLast commitLast update
1 month ago
10 days ago
9 days ago
9 days ago
10 days ago
9 days ago
1 month ago
17 days ago
README

IndexFill

English | 简体中文

Applicable Products

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

Function

  • Operator function: along the given axis dim of input x, fills and replaces the values at the positions specified by indices with value in a non-inplace manner.

  • Example: The input x is:

      [[1, 2, 3],

       [4, 5, 6],

       [7, 8, 9]]

    When dim = 0, indices = [0, 2], and value = 0, the computation result of the operator is:

      [[0, 0, 0],

       [4, 5, 6],

       [0, 0, 0]]

    When dim = 1, indices = [0, 2], and value = 0, the computation result of the operator is:

      [[0, 2, 0],

       [0, 5, 0],

       [0, 8, 0]]

Parameters

Parameter name Input/Output/Attribute Description Data type Data format
x Input x in the function example, that is, the tensor whose values at the specified positions are to be replaced with value in a non-inplace manner. FLOAT16, FLOAT, DOUBLE, INT8, UINT8, INT16, INT32, INT64, BOOL, BFLOAT16 ND
indices Input Specifies the indices at which x will be filled on the dim dimension. The element values are smaller than the size of the corresponding dim of x, and negative indices are supported. INT32, INT64 ND
value Input Specifies the data value for filling. The data type must be consistent with x. Same as x ND
dim Attribute Specifies the dimension of x to be filled. The value range of dim is [-x.dim(), x.dim()). INT64 -
y Output Output tensor after filling, with the shape consistent with input x. Same as input x ND

Constraints

None

Invocation Description

Invocation method Invocation sample Description
aclnn invocation test_aclnn_index_fill Invokes the IndexFill operator through the aclnnIndexFill interface.