A hacky solution for this problem of quantization implies using 'SYMMETRIC' padding instead of 'CONSTANT' in such a way the maxpooling layers during quantization take max(a, a) = a instead of max(-inf, a) = a. However this only works for the case of a single pixel added to the borders of the input, for other cases the problem persists