def accumulate
import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backwardimport Base
81def accumulate(total: Maybe<&2, F32>, contribution: Maybe<&2, F32>) -> Maybe<&2, F32>:
82 match total contribution:
83 case None{} contribution:
84 contribution
85 case Some{held} None{}:
86 Some{held}
87 case Some{held} Some{value}:
88 Some{F32.add(held, value)}
Uses (3)
Used by (8)
- bendtorch-core@0.1.0.0/src/autograd/backward:merge
- bendtorch-core@0.1.0.0/src/autograd/backward:bumped
- bendtorch-core@0.1.0.0/src/autograd/backward_PROOF:is_some_accumulate
- bendtorch-core@0.1.0.0/src/autograd/backward_PROOF:somes_bumped
- bendtorch-core@0.1.0.0/src/autograd/backward_LAWS:accumulate_adds_total_first
- …