Source/Packages

Component.Pointwise

packages/components/src/Component/Pointwise.alpha

408 lines49 declarations15.8 KiBSHA-256 b4c565ce95d3

def · lines 377–393

pointwiseReluSquaredBackwardRounded

Full file
377def pointwiseReluSquaredBackwardRounded =
378  (lambda erased inputs : Nat .
379    unrestricted round : (pi unrestricted value : (family PointwiseExpression StdU32 inputs) . family PointwiseExpression StdU32 inputs) .
380    unrestricted x : (family PointwiseExpression StdU32 inputs) .
381    unrestricted gradient : (family PointwiseExpression StdU32 inputs) .
382    let unrestricted multiply =
383      (pointwiseBinary StdU32 inputs PointwiseMultiply)
384      in
385      let unrestricted relu =
386        (round (pointwiseBinary StdU32 inputs PointwisePositiveGate x x))
387        in
388        then (pointwiseBinary StdU32 inputs PointwisePositiveGate x)
389          round
390          (multiply gradient)
391          round
392          (multiply (constructor PointwiseExpression PointwiseConstant StdU32 inputs 0x40000000))
393          relu)

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.