def skips

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

import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward
import Base

550# Whether the VJP of Frozen{id, node} skips a product instead of dropping it:
551# node is x @ W^T and id is x and not W.
552def skips(+id: Nat, node: Node) -> Bool:
553  match node:
554    case MatmulNT{a, b, left, right}:
555      Bool.and(Nat.is_eq(id, a), Bool.not(Nat.is_eq(id, b)))
556    case other:
557      False{}

Uses (6)

Used by (1)