law scalar_relu_left_below

bendtorch-core@0.1.0.0 · src/tensor/relu_LAWS.bend:72

import bendtorch-core@0.1.0.0/src/tensor/relu_LAWS.bend as ReluLAWS
import Base
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise

72# ReluLeft is PyTorch's relu, clamp_min(x, 0), on the left word: +0.0 where
73# the word is below zero, and the word itself otherwise, so -0.0 stays -0.0
74# and a NaN keeps its sign and payload. The right word is ignored: the
75# forward is the pointwise product with a rank-0 +0.0.
76law scalar_relu_left_below:
77  for +left: F32
78  for +right: F32
79  for below: {Elementwise.below_zero(left) == True{} : Bool}
80  {Elementwise.scalar(Elementwise.ReluLeft{}, left, right) == 0.0 : F32}

Uses (7)

Used by (0)

No other definition uses this definition.