For quantized Div, the error shouldn't exceed (2*step + step^2).
| 72 | |
| 73 | // For quantized Div, the error shouldn't exceed (2*step + step^2). |
| 74 | inline float GetTolerance(int min, int max) { |
| 75 | const float kQuantizedStep = (max - min) / 255.0f; |
| 76 | const float kQuantizedTolerance = |
| 77 | 2.0f * kQuantizedStep + kQuantizedStep * kQuantizedStep; |
| 78 | return kQuantizedTolerance; |
| 79 | } |
| 80 | |
| 81 | TEST(FloatDivOpTest, NoActivation) { |
| 82 | FloatDivOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}}, |
no outgoing calls
no test coverage detected