To handle boolean for nnapi delegate, change type to quantized tensor and call NNAPI
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
scale = tensor->params.scale;
zeroPoint = tensor->params.zero_point;
break;
+ case kTfLiteBool:
+ // Workaround to pass bool type under NNAPI
+ // Use bool type using ANEURALNETWORKS_TENSOR_QUANT8_ASYMM with scale = 1.0f and zero_point = 0
+ nn_type = ANEURALNETWORKS_TENSOR_QUANT8_ASYMM;
+ scale = 1.0f;
+ zeroPoint = 0;
+ break;
default:
logError("Unsupported tensor type %d", tensor->type);
return kTfLiteError;