law reset_then_accumulate_moves_in
import bendtorch-core@0.1.0.0/src/autograd/gradient_LAWS.bend as GradientLAWSimport 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
import bendtorch-core@0.1.0.0/src/tensor/elementwise_totality.bend as Totality
import bendtorch-core@0.1.0.0/src/autograd/gradient.bend as Gradient
163# After a reset, a contribution with the slot's dimensions moves in unchanged,
164# so a -0.0 word stays -0.0 instead of becoming +0.0 + -0.0.
165law reset_then_accumulate_moves_in:
166 for +shape: Shape.Shape
167 for slot: Gradient.Slot
168 for contribution: Core.Dynamic
169 for agrees: {Totality.dimensions(contribution) == Shape.dimensions(shape) : List<&2, U32>}
170 {Gradient.accumulate(shape, Gradient.reset(slot), contribution) == Gradient.Accumulated{Gradient.Held{contribution}} : Gradient.Outcome}
Uses (12)
Used by (0)
No other definition uses this definition.