• Q
    Fix elementwise_div UT by providing user defined gradients (#43536) (#43909) · 26187c27
    Qi Li 提交于
    Cherry-pick of #43536
    
    Backgroud in #43262
    
    In elementwise_div UT, the numeric gradient (validation) has large relative error in comparison to analytic gradient (Paddle OP).
    
        The default rtol for UTs is 0.005
        The rtol for float32 and float64 elementwise_div OP is set to be 0.05
        The rtol for float16 and bfloat16 elementwise_div OP is set to be 1.0
    
    The relative error is too large, so this PR provides user defined gradients to test elementwise_div followed by the analytic method.
    26187c27
test_elementwise_div_op.py 13.0 KB