def held_success

bendtorch-core@0.1.0.0 · src/autograd/gradient_PROOF.bend:747

import bendtorch-core@0.1.0.0/src/autograd/gradient_PROOF.bend as GradientPROOF
import 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/layout.bend as Layout
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
import bendtorch-core@0.1.0.0/src/autograd/gradient_LAWS.bend as Laws

747def held_success(+shape: Shape.Shape, contribution: Core.Dynamic, gradient: Core.Dynamic,
748  -fits: {Totality.dimensions(gradient) == Shape.dimensions(shape) : List<&2, U32>},
749  -agrees: {Totality.dimensions(contribution) == Shape.dimensions(shape) : List<&2, U32>}) ->
750  Laws.Success<Gradient.held(shape, contribution, gradient)>:
751  Core.Packed{+total_shape, total} = gradient
752  held_checked_success(shape, contribution, total_shape, total,
753    Layout.words_same(Shape.dimensions(total_shape), Shape.dimensions(shape)), {==}, fits, agrees)

Uses (10)

Used by (1)