In utils.utils two functions (threshold and digitize) are added that enable differentiable thresholding and bit depth manipulation.
For both of them, surrogate gradients are used. For thresholding, the gradients of the sigmoid function are used. For digitization pass-through approach is used.
In
utils.utils
two functions (threshold
anddigitize
) are added that enable differentiable thresholding and bit depth manipulation.For both of them, surrogate gradients are used. For thresholding, the gradients of the sigmoid function are used. For digitization pass-through approach is used.