def slice

bendtorch-core@0.1.0.0 · src/tensor/slice.bend:377

import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice
import Base
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core

377# PyTorch's input[..., start:stop:step, ...] with the slice at axis `dim`.
378# The input owner always comes back unchanged next to the result.
379def slice(input: Core.Dynamic, +dim: U32, +start: U32, +stop: U32, +step: U32) -> Core.Dynamic & Result<&2, &1, Error, Core.Dynamic>:
380  Core.Packed{+shape, tensor} = input
381  sliced(shape, tensor, plan(shape, dim, start, stop, step))

Uses (7)

Used by (7)