def mean_shaped

bendtorch-core@0.1.0.0 · src/autograd/loss.bend:193

import bendtorch-core@0.1.0.0/src/autograd/loss.bend as Loss
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

193def mean_shaped(pair: Core.Dynamic & Shape.Shape) -> Result<&2, &1, Core.Error, Core.Dynamic>:
194  (input, +shape) = pair
195  total_over(Shape.logical_numel(Shape.dimensions(shape)), Reduction.sum_dynamic(input))

Uses (10)

Used by (1)