def source_value
import bendtorch-core@0.1.0.0/src/autograd/broadcast_LAWS.bend as BroadcastLAWSimport Base
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
17# The input value that the specification assigns to one output position: the
18# input offset of its right-aligned broadcast projection.
19def source_value(input: Core.Dynamic, offsets: Maybe<&1, U32 & U32>) -> Maybe<&2, F32>:
20 match offsets:
21 case None{}:
22 None{}
23 case Some{pair}:
24 (input_offset, target_offset) = pair
25 Core.checked_observe_dynamic(input, input_offset)