• Nikhila Ravi's avatar
    Softmax blending small fix · 5852b74d
    Nikhila Ravi authored
    Summary:
    Small fix to the softmax blending function.
    
    To avoid overflow in the exponential for the softmax, the exponent is shifted by the maximum value. In the final calculation of the color there is a weighted sum between the pixel color and the background color - in order for the sum to be correct, the background color also needs to be handled in the same way witt the shifted exponent.
    
    Reviewed By: gkioxari
    
    Differential Revision: D23148301
    
    fbshipit-source-id: 86066586ee7d3ce7bd4a2076b12ce191fbd151a7
    5852b74d
test_blending.py 14.6 KB