This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ae2c5391 mlearning/tflite-micro: Register DEPTHWISE_CONV_2D in 
tflm_tool resolver.
0ae2c5391 is described below

commit 0ae2c5391c87cf038cea95419bcc7bc9b86b0df2
Author: Ansh Rai <[email protected]>
AuthorDate: Sun Sep 6 12:54:05 2026 +0000

    mlearning/tflite-micro: Register DEPTHWISE_CONV_2D in tflm_tool resolver.
    
    MicroMutableOpResolver<8> only registered 8 ops, missing
    DEPTHWISE_CONV_2D, required by any depthwise-separable CNN
    (MobileNet-style, DS-CNN keyword-spotting models). The kernel
    already exists upstream (Register_DEPTHWISE_CONV_2D_INT8() in
    tensorflow/lite/micro/kernels/depthwise_conv.h); this wires it
    into the resolver and bumps the template size to <9>.
    
    Verified with micro_speech_quantized.tflite on sim:tflm.
    Before: Didn't find op for builtin opcode 'DEPTHWISE_CONV_2D'.
    After: RESHAPE/DEPTHWISE_CONV_2D/FULLY_CONNECTED/SOFTMAX all execute.
    
    Signed-off-by: Ansh Rai <[email protected]>
---
 mlearning/tflite-micro/tflm_tool.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mlearning/tflite-micro/tflm_tool.cc 
b/mlearning/tflite-micro/tflm_tool.cc
index 8edcf45a4..200df5391 100644
--- a/mlearning/tflite-micro/tflm_tool.cc
+++ b/mlearning/tflite-micro/tflm_tool.cc
@@ -110,8 +110,9 @@ extern "C" int main(int argc, FAR char* argv[])
 
   /* HACK: can change operators here. */
 
-  tflite::MicroMutableOpResolver<8> resolver;
+  tflite::MicroMutableOpResolver<9> resolver;
   resolver.AddConv2D(tflite::Register_CONV_2D_INT8());
+  resolver.AddDepthwiseConv2D(tflite::Register_DEPTHWISE_CONV_2D_INT8());
   resolver.AddMaxPool2D(tflite::Register_MAX_POOL_2D_INT8());
   resolver.AddQuantize(tflite::Register_QUANTIZE_FLOAT32_INT8());
   resolver.AddDequantize(tflite::Register_DEQUANTIZE_INT8());

Reply via email to