Elementwise.relu_backward: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise Lines 59-63 of bendtorch-core@0.1.0.0/src/tensor/elementwise.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&start_line=59&end_line=63 import Base # PyTorch's relu gradient, threshold_backward(g, relu(x), 0): +0.0 where # x <= 0, else g's own word. At x = +0.0 and -0.0 it is +0.0; at a NaN x it # is g. def relu_backward(+x: F32, g: F32) -> F32: zero_if(at_most_zero(x), g) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=at_most_zero https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=zero_if