[object Object]

[object Object][object Object]undefined
[object Object]
  • 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 outout from the input tensor selfself in the specified dimension dimdim based on the specified start position beginbegin, end position endend, and stride stridesstrides. beginbegin and endend can be set to values other than [0,self.shape[dim]][0, self.shape[dim]]. After the values are set, they are converted into valid values according to the following formula. Assume that self.shape[dim] = N:begin={0,if  begin<NN,if  begin>=N(begin+N)%N,otherwisebegin = \begin{cases} &0, & if\;begin < -N \\ &N, & if\;begin >= N\\ &(begin+N) \% N, & otherwise \end{cases} end={N,if  end>=Nbegin,else  if  (end+N)%N<begin(end+N)%N,otherwiseend = \begin{cases} &N, & if\; end >= N\\ &begin, & else\;if\; (end+N)\%N < begin \\ &(end+N)\%N, & otherwise\\ \end{cases} out.shapeout.shape is the same as self.shapeself.shape except on the [object Object] axis.out.shape[dim]=endbegin+strides1stridesout.shape[dim] = ⌊\frac{end - begin + strides - 1}{strides}⌋ If the mask parameter exists, outshape is further calculated according to the following rules: beginMaskbeginMask specifies that the beginbegin of the index dimension corresponding to the bitbit whose value is 1 is ignored, endMaskendMask specifies that the endend of the index dimension corresponding to the bitbit whose value is 1 is ignored, ellipsisMaskellipsisMask selects all subsequent dimensions starting from the index dimension corresponding to the bitbit whose value is 1 until the specified beginbegin is encountered, newAxisMasknewAxisMask specifies that the shapeshape whose dimension is 1 is added to the index dimension corresponding to the bitbit whose value is 1, shrinkAxisMaskshrinkAxisMask specifies that the index dimension corresponding to the bitbit whose value is 1 is forcibly reduced to 1.
[object Object]

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]
[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]
[object Object]
  • Parameter description:

    [object Object]
  • Return value

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic computation:
    • The aclnnStridedSlice is implemented in deterministic mode by default.
[object Object]

The following example is for reference only. For details, see .

[object Object]