def output_dimensions

bendtorch-core@0.1.0.0 · src/autograd/broadcast_pointwise_LAWS.bend:15

import bendtorch-core@0.1.0.0/src/autograd/broadcast_pointwise_LAWS.bend as BroadcastPointwiseLAWS
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/autograd/broadcast.bend as Broadcast

15def output_dimensions(result: Core.Dynamic & Result<&2, &1, Broadcast.Error, Core.Dynamic>) -> Maybe<&2, List<&2, U32>>:
16  (input, outcome) = result
17  match outcome:
18    case Fail{error}:
19      None{}
20    case Done{Core.Packed{shape, tensor}}:
21      Some{Shape.dimensions(shape)}

Uses (9)

Used by (1)