def loop_value

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

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

51def loop_value(-shape: Shape.Shape, result: Result<&2, &1, Core.Error, Core.Tensor<shape> & F32>) -> Maybe<&2, F32>:
52  match result:
53    case Fail{error}:
54      None{}
55    case Done{pair}:
56      (tensor, value) = pair
57      Some{value}

Uses (8)

Used by (10)