def mean

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

import bendtorch-core@0.1.0.0/src/autograd/loss.bend as Loss
import Base
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core

197# PyTorch's mean of every element: the ordered sum divided by the element
198# count, F32.div of the two. The sum adds left to right from +0.0, where
199# PyTorch's CPU sum adds in a cascade, so for many words the last bits can
200# differ.
201def mean(input: Core.Dynamic) -> Result<&2, &1, Core.Error, Core.Dynamic>:
202  mean_shaped(Core.shape(input))

Uses (5)

Used by (1)