[object Object]

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

Extracts a sub-tensor outout from the input tensor selfself along the specified dimension dimdim based on the given range [start,end][start, end] and step stepstep. startstart 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 to valid values using the following formula (assume self.shape[dim] = N):

start={0,if  start<NN,if  start>=N(start+N)%N,otherwisestart = \begin{cases} &0, & if\;start < -N \\ &N, & if\;start >= N\\ &(start+N) \% N, & otherwise \end{cases} end={N,if  end>=Nstart,else  if  (end+N)%N<start(end+N)%N,otherwiseend = \begin{cases} &N, & if\; end >= N\\ &start, & else\;if\; (end+N)\%N < start \\ &(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]=endstart+step1stepout.shape[dim] = ⌊\frac{end - start + step - 1}{step}⌋ [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.
  • Returns:

    [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]

None.

[object Object]

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

[object Object]