Fix a floating-point check in the max pool kernel
PiperOrigin-RevId: 301741177 Change-Id: I46de90f4781165733aba6e1a4c84517a2cfed24c
This commit is contained in:
parent
c66ecc5c0e
commit
732bce892c
@ -91,9 +91,9 @@ TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteNode* node) {
|
||||
|
||||
if (input->type == kTfLiteUInt8 || input->type == kTfLiteInt8) {
|
||||
if (pool_type == kAverage || pool_type == kMax) {
|
||||
TF_LITE_ENSURE_EQ(context, input->params.scale, output->params.scale);
|
||||
TF_LITE_ENSURE_EQ(context, input->params.zero_point,
|
||||
output->params.zero_point);
|
||||
TFLITE_DCHECK_LE(std::abs(input->params.scale - output->params.scale),
|
||||
1.0e-6);
|
||||
TFLITE_DCHECK_EQ(input->params.zero_point, output->params.zero_point);
|
||||
}
|
||||
if (pool_type == kL2) {
|
||||
// We currently don't have a quantized implementation of L2Pool
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user