In the training phase (offline), the weights and biases are tuned based on a defined loss function, and back propagation computes the gradient over each layer. The use of quantization functions during training is forbidden because it is not differentiable and therefore breaks the back propagation graph. To solve this issue, [1]} proposes to use a differentiable activation function for 1 bit PS. However, this method does not scale well to a higher number of bits, as we discuss later in Section . In this paper, we instead rely on the straight through estimator (STE) technique [2]}. The quantization function (REF ) is only activated in the forward pass, and the output activation values are constrained in the range \([0,2\pi ]\) .
In the backward pass, the gradient is simply passed through unchanged.
In what follows we describe the training of each structure.
