FilesLast commitLast update
4 days ago
2 months ago
5 days ago
19 days ago
12 days ago
8 months ago
14 days ago
17 days ago
12 days ago
1 month ago
11 days ago
README

Expand

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: broadcasts the input tensor to the specified shape. For example, if the shape of the input tensor is (1, 4) and the specified shape is (2, 4), the output is a tensor with the shape (2, 4).

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input tensor The tensor to be broadcast. FLOAT16, FLOAT, INT32, INT64, INT8, UINT8, BOOL, BF16 ND
shape Input tensor Indicates the shape size of x after broadcasting. INT64, INT32 -
y Output The number of dimensions does not exceed 8. The shape is determined by the shape input, and the dtype must be the same as that of self. Same as x ND

Constraint Description

None

Invocation Description

Invocation Method Sample Code Description
Graph-mode invocation test_geir_expand Invokes the Expand operator through the GE IR graph mode
aclnn API test_aclnn_expand Invokes the Expand operator through the aclnnExpand API.