SgdLAWS.sgd_descend_scalar: law of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/sgd_LAWS.bend as SgdLAWS Lines 15-21 of bendtorch-core@0.1.0.0/src/autograd/sgd_LAWS.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/sgd_LAWS.bend&start_line=15&end_line=21 import Base import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise # The cell of an SGD step: p - lr * g, with the product rounded before the # difference, F32 operation by F32 operation. law sgd_descend_scalar: for +lr: F32 for +p: F32 for +g: F32 {Elementwise.scalar(Elementwise.Descend{lr}, p, g) == F32.sub(p, F32.mul(lr, g)) : F32} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sub https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=Operation https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=scalar