def retained_observe

bendtorch-core@0.1.0.0 · src/tensor/reduction_LAWS.bend:59

import bendtorch-core@0.1.0.0/src/tensor/reduction_LAWS.bend as ReductionLAWS
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

59def retained_observe(-shape: Shape.Shape, result: Result<&2, &1, Core.Error, Core.Tensor<shape> & F32>, +other: U32) -> Maybe<&2, F32>:
60  match result:
61    case Fail{error}:
62      None{}
63    case Done{pair}:
64      (tensor, value) = pair
65      Core.checked_observe(shape, tensor, other)

Uses (10)

Used by (3)