def terms

bendtorch-core@0.1.0.0 · src/autograd/reduce.bend:216

import bendtorch-core@0.1.0.0/src/autograd/reduce.bend as Reduce
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

216# A target cell costs one term per contribution word that lands on it.
217def terms(+plan: Shape.BroadcastPlan, +length: Nat) -> Nat:
218  Nat.div(Shape.elements(Shape.output_shape(plan)), length)

Uses (5)

Used by (1)