def empty_tensor_sum

bendtorch-core@0.1.0.0 · src/tensor/reduction_PROOF.bend:686

import bendtorch-core@0.1.0.0/src/tensor/reduction_PROOF.bend as ReductionPROOF
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/reduction.bend as Reduction
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage

686def empty_tensor_sum(+shape: Shape.Shape, tensor: Core.Tensor<shape>) ->
687  {Reduction.sum_observation(shape, Reduction.sum_result(shape, Reduction.tensor_sum(shape, 0n, tensor))) == Some{0.0} : Maybe<&2, F32>}:
688  Core.TTensor{storage, exact} = tensor
689  match storage:
690    case Storage.Empty{}:
691      {==}
692    case Storage.Owned{+depth, +length, array, balanced, valid}:
693      {==}

Uses (8)

Used by (1)