diff options
Diffstat (limited to 'ethosu')
-rw-r--r-- | ethosu/vela/tflite_graph_optimiser.py | 2 | ||||
-rw-r--r-- | ethosu/vela/tflite_supported_operators.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py index 27513d3d..1310ee63 100644 --- a/ethosu/vela/tflite_graph_optimiser.py +++ b/ethosu/vela/tflite_graph_optimiser.py @@ -586,7 +586,7 @@ def convert_resizebilinear_to_depthwise_convolutions(op, half_pixel_centers=True # need to append the bias tensor as resize ops only have 2 inputs assert len(dw_conv.inputs) == 2 dw_conv.inputs.append(None) - fixup_bias_tensors(dw_conv, None, None) + fixup_bias_tensors(dw_conv, None, None, dtype=DataType.int32) dw_conv.set_ifm_ofm_shapes() dw_conv = dw_conv.clone(f"_{index}") diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py index 9aa174de..8b448dfe 100644 --- a/ethosu/vela/tflite_supported_operators.py +++ b/ethosu/vela/tflite_supported_operators.py @@ -666,12 +666,12 @@ class TFLiteSupportedOperators: @staticmethod def constraint_resize_half_pixel_centers(op): - """Half_pixel_centers are only supported for resize bilinear with IFM dtype int8 or uint8""" - valid = op.ifm.dtype in (DataType.int8, DataType.uint8) + """Half_pixel_centers are only supported for resize bilinear""" + valid = True half_pixel_centers = op.attrs.get("half_pixel_centers", False) if half_pixel_centers and op.type != Op.ResizeBilinear: valid = False - return valid, f"Op type={op.type}, ifm dtype={op.ifm.dtype} and half_pixel_centers={half_pixel_centers}" + return valid, f"Op type={op.type} and half_pixel_centers={half_pixel_centers}" @staticmethod def constraint_resizebi_half_pixel_centers_dims(op): |