def nt_right

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

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

386# g^T @ x for the right operand.
387def nt_right(+target: Nat, +shape: Shape.Shape, copy: Core.Dynamic, pair: Core.Dynamic & Core.Dynamic) ->
388  Core.Dynamic & Result<&2, &1, Error, Contribution>:
389  (left, flipped) = pair
390  (left, multiplied(target, shape, weight_product(copy, flipped)))

Uses (10)

Used by (5)