def batched_right
bendtorch-core@0.1.0.0 · src/autograd/tensor_backward.bend:583
import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend as Batched
583
584
585def batched_right(+b: Nat, +right: Shape.Shape, +plan: Batched.Plan, copy: Core.Dynamic, pair: Core.Dynamic & Core.Dynamic) ->
586 Core.Dynamic & Result<&2, &1, Error, Contribution>:
587 (x, left_copy) = pair
588 (x, batched_reduced(b, right, Batched.right_gradient(plan, left_copy, copy)))