From f54c18dff589f43abcfc57a119d2c1f87a5231ba Mon Sep 17 00:00:00 2001 From: Dwight Lidman Date: Wed, 29 Sep 2021 17:23:03 +0200 Subject: MLBEDSW-5284 - MLCE: MEAN batch size constraint Adds a constraint on batch size for the MEAN operator. Due to the restrictions imposed by the NHCWB16 format, some operators do not allow batch sizes larger than 1. The MEAN operator uses the operators in its implementation, but the constraint was missing and thus the operator was being wrongly placed on the NPU. Signed-off-by: Dwight Lidman Change-Id: I95e07a9151a6a131c337caa3114da1154be39e49 --- ethosu/vela/tflite_supported_operators.py | 1 + 1 file changed, 1 insertion(+) (limited to 'ethosu/vela') diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py index 933302f5..d590054f 100644 --- a/ethosu/vela/tflite_supported_operators.py +++ b/ethosu/vela/tflite_supported_operators.py @@ -204,6 +204,7 @@ class TFLiteSupportedOperators: self.specific_constraints[Op.Pad].append(TFLiteSupportedOperators.constraint_pad_type) # Mean specific checks: + self.specific_constraints[Op.Mean].append(TFLiteSupportedOperators.constraint_batch_size) self.specific_constraints[Op.Mean].append(TFLiteSupportedOperators.constraint_mean_height_width_product_avgpool) self.specific_constraints[Op.Mean].append(TFLiteSupportedOperators.constraint_mean_height_width_product) self.specific_constraints[Op.Mean].append(TFLiteSupportedOperators.constraint_mean_height_width_product_int8) -- cgit v1.2.1