def held_mapping

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

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/autograd/gradient.bend as Gradient
import bendtorch-core@0.1.0.0/src/autograd/gradient_LAWS.bend as Laws

560def held_mapping(+shape: Shape.Shape, contribution: Core.Dynamic, gradient: Core.Dynamic) ->
561  Holds<Laws.Mapping(Gradient.Held{gradient}, contribution, shape, Gradient.held(shape, contribution, gradient))>:
562  Core.Packed{+total_shape, total} = gradient
563  held_checked_mapping(shape, contribution, total_shape, total,
564    Layout.words_same(Shape.dimensions(total_shape), Shape.dimensions(shape)), {==})

Uses (9)

Used by (1)