def construction_values_dimensions

bendtorch-core@0.1.0.0 · src/tensor/core_PROOF.bend:32

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

32def construction_values_dimensions(+dimensions: List<&2, U32>, +shape: Shape.Shape,
33  preserved: {Shape.dimensions(shape) == dimensions : List<&2, U32>},
34  result: Result<&2, &1, Core.Error, Core.Tensor<shape>>) ->
35  Core.ConstructionDimensions(dimensions, Core.construct_values(shape, result)):
36  match result:
37    case Fail{error}:
38      Unit{}
39    case Done{tensor}:
40      preserved

Uses (10)

Used by (1)