def gather_shaped

bendtorch-core@0.1.0.0 · src/tensor/gather.bend:165

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

165def gather_shaped(+dimensions: List<&2, U32>, +axis: Nat, +index: List<&2, U32>, +entries: List<&2, U32>, same: Bool) ->
166  Result<&2, &2, Error, Planned>:
167  match same:
168    case False{}:
169      Fail{IndexShapeMismatch{}}
170    case True{}:
171      ranged(Gathered{}, dimensions, axis, entries, Slice.axis_extent(index, axis), below(entries, Slice.axis_extent(dimensions, axis)))

Uses (11)

Used by (4)