Expand description
Binary activation/weight quantization functions (STEBinary and SmoothSign).
Functionsยง
- binarize_
sign_ no_ grad - Binarize a floating-point tensor without tracking gradients:
values
>= 0map to+1, values< 0map to-1. - smooth_
sign - Apply
SmoothSign(signforward with zero mapped to+1, derivativealpha * (1 - tanh(alpha * x)^2)backward). - ste_
binary - Apply
STEBinary(signforward with zero mapped to+1, clipped identity backward for|x| < 1).