def checked

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

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

113def checked(+shape: Shape.Shape, slot: Slot, +contribution_shape: Shape.Shape, tensor: Core.Tensor<contribution_shape>, same: Bool) -> Outcome:
114  match same:
115    case False{}:
116      Refused{slot, Core.Packed{contribution_shape, tensor}, ShapeMismatch{}}
117    case True{}:
118      agreed(shape, slot, Core.Packed{contribution_shape, tensor})

Uses (8)

Used by (8)