def gather_kept

bendtorch-core@0.1.0.0 · src/autograd/tensor_backward.bend:1527

import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward
import Base
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather

1527def gather_kept(node: Node, entries: List<&1, Entry>, result: Result<&2, &1, Gather.Error, Core.Dynamic>) ->
1528  Tape & Result<&2, &2, Error, Nat>:
1529  match result:
1530    case Fail{error}:
1531      (Tape{entries}, Fail{GatherError{error}})
1532    case Done{output}:
1533      push(node, output, Unsaved{}, entries)

Uses (13)

Used by (1)