Loss.mse_scale: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/loss.bend as Loss Lines 45-48 of bendtorch-core@0.1.0.0/src/autograd/loss.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/loss.bend&start_line=45&end_line=48 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape # 2 / N, the factor of PyTorch's mse_loss backward with mean reduction, for # the N cells of the broadcast shape. def mse_scale(+shape: Shape.Shape) -> F32: F32.div(2.0, count_f32(Shape.logical_numel(Shape.dimensions(shape)))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.div https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/loss.bend&name=count_f32 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=dimensions https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=logical_numel