type Advanced

bendtorch-core@0.1.0.0 · src/tensor/transforms.bend:331

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

331type Advanced<-input: Shape.Shape, -axes: List<&2, U32>, -plan: Layout.Plan<input, axes>,
332  -original: Core.Tensor<input>, -before_source: Core.Tensor<input>, -after_source: Core.Tensor<input>,
333  -before_target: Core.Tensor<Layout.output(input, axes, plan)>, -after_target: Core.Tensor<Layout.output(input, axes, plan)>, -cursor: Nat> is Data:
334  Advanced{-word_exact: {U32.to_nat(U32.from_nat(cursor)) == cursor : Nat},
335    -source_kept: @+other: U32 ->
336      {Core.checked_observe(input, after_source, other) == Core.checked_observe(input, before_source, other) : Maybe<&2, F32>},
337    -current: {Core.checked_observe(Layout.output(input, axes, plan), after_target, U32.from_nat(cursor)) ==
338      expected_output(input, axes, plan, original, U32.from_nat(cursor)) : Maybe<&2, F32>},
339    -current_checked: Core.ObservationChecked(Core.Packed{Layout.output(input, axes, plan), after_target}, U32.from_nat(cursor)),
340    -past_checked: @+other: Nat -> @-earlier: {Nat.is_lt(other, cursor) == True{} : Bool} ->
341      Core.ObservationChecked(Core.Packed{Layout.output(input, axes, plan), after_target}, U32.from_nat(other)),
342    -frame: @+other: Nat -> @-earlier: {Nat.is_lt(other, cursor) == True{} : Bool} ->
343      {Core.checked_observe(Layout.output(input, axes, plan), after_target, U32.from_nat(other)) ==
344        Core.checked_observe(Layout.output(input, axes, plan), before_target, U32.from_nat(other)) : Maybe<&2, F32>}}

Uses (17)

Used by (2)