def sum

bendtorch-core@0.1.0.0 · src/tensor/reduction.bend:162

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

162def sum(+shape: Shape.Shape, tensor: Core.Tensor<shape>) ->
163  Result<&2, &1, Core.Error, Core.Tensor<shape> & Core.Tensor<scalar_shape()>>:
164  sum_result(shape, tensor_sum(shape, Shape.elements(shape), tensor))

Uses (9)

Used by (8)