- Function: Extracts a sub-tensor from the input tensor based on the specified start position, end position, and stride.
- The formula is as follows: Extracts the sub-tensor from the input tensor in the specified dimension based on the specified start position , end position , and stride .
and can be set to values other than . After the values are set, they are converted into valid values according to the following formula. Assume that self.shape[dim] = N:
is the same as except on the
[object Object]axis. If the mask parameter exists, outshape is further calculated according to the following rules: specifies that the of the index dimension corresponding to the whose value is 1 is ignored, specifies that the of the index dimension corresponding to the whose value is 1 is ignored, selects all subsequent dimensions starting from the index dimension corresponding to the whose value is 1 until the specified is encountered, specifies that the whose dimension is 1 is added to the index dimension corresponding to the whose value is 1, specifies that the index dimension corresponding to the whose value is 1 is forcibly reduced to 1.
Each operator is divided into two functions (see../common/Two-Stage APIs.md). You must call aclnnStridedSliceGetWorkspaceSize to obtain the workspace size required for computation and the executor that contains the operator computation process, and then call aclnnStridedSlice to perform the computation.
[object Object]
[object Object]
Parameters:
[object Object]Return value
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
Parameter description:
[object Object]Return value
- Deterministic computation:
- The aclnnStridedSlice is implemented in deterministic mode by default.
The following example is for reference only. For details, see .
[object Object]