def terms
import bendtorch-core@0.1.0.0/src/autograd/reduce.bend as Reduceimport 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)