[object Object][object Object][object Object]undefined
[object Object]

Function: extracts the tensor outout from the input tensor selfself based on the given dimension axesaxes, range [starts,ends][starts, ends], and strides stepssteps. starts[i]starts[i] and ends[i]ends[i] can be set to values other than [0,self.shape[axes[i]]][0, self.shape[axes[i]]]. After the values are set, they are converted to valid values using the following formula (assume self.shape[axes[i]]=Nself.shape[axes[i]] = N):

starts[i]={0,if  starts[i]<NN,if  starts[i]>=N(starts[i]+N)%N,otherwisestarts[i] = \begin{cases} &0, & if\;starts[i] < -N \\ &N, & if\;starts[i] >= N\\ &(starts[i]+N) \% N, & otherwise \end{cases} ends[i]={N,if  ends[i]>=Nstarts[i],else  if  (ends[i]+N)%N<starts[i](ends[i]+N)%N,otherwiseends[i] = \begin{cases} &N, & if\; ends[i] >= N\\ &starts[i], & else\;if\; (ends[i]+N)\%N < starts[i] \\ &(ends[i]+N)\%N, & otherwise\\ \end{cases}

out.shapeout.shape is the same as self.shapeself.shape except on the [object Object] axis.

out.shape[axes[i]]=ends[i]starts[i]+steps[i]1steps[i]out.shape[axes[i]] = ⌊\frac{ends[i] - starts[i] + steps[i] - 1}{steps[i]}⌋ [object Object]

Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
    • [object Object]Atlas training products[object Object]: The data type cannot be BFLOAT16.
  • Return Value

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

    The first-phase API implements input parameter verification. The following errors may be thrown:

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns:

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

[object Object]
  • Deterministic compute:
    • [object Object] defaults to a deterministic implementation.
[object Object]

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

[object Object]