def output_dimensions

bendtorch-core@0.1.0.0 · src/tensor/contracts/pointwise.bend:120

import bendtorch-core@0.1.0.0/src/tensor/contracts/pointwise.bend as Pointwise
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

120def output_dimensions(result: (Core.Dynamic & Core.Dynamic) & Result<&2, &1, Core.Error, Core.Dynamic>) -> Maybe<&2, List<&2, U32>>:
121  (inputs, outcome) = result
122  match outcome:
123    case Fail{error}:
124      None{}
125    case Done{Core.Packed{shape, tensor}}:
126      Some{Shape.dimensions(shape)}

Uses (9)

Used by (2)