def held

bendtorch-core@0.1.0.0 · src/autograd/gradient.bend:102

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

102def held(+shape: Shape.Shape, contribution: Core.Dynamic, gradient: Core.Dynamic) -> Outcome:
103  Core.Packed{+total_shape, total} = gradient
104  held_checked(contribution, total_shape, total, Layout.words_same(Shape.dimensions(total_shape), Shape.dimensions(shape)))

Uses (6)

Used by (4)